linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sylv <sylv@sylv.io>
To: Guenter Roeck <linux@roeck-us.net>,
	Jean Delvare <jdelvare@suse.com>,
	Jonathan Corbet <corbet@lwn.net>
Cc: linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org,
	Patrick Rudolph <patrick.rudolph@9elements.com>,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH v2 2/3] hwmon (xdpe12284): Add support for xdpe11280
Date: Mon, 21 Feb 2022 13:13:15 +0100	[thread overview]
Message-ID: <337fe0598837b35ee96773339e9cdc8345a7c16e.camel@sylv.io> (raw)
In-Reply-To: <aa82f347-1b1a-8c40-b5cb-9efe292ae0ec@roeck-us.net>

On Thu, 2022-02-17 at 11:25 -0800, Guenter Roeck wrote:
> On 2/17/22 10:38, sylv wrote:
> [ ... ]
> 
> > > 
> > > That makes me wonder if the chip needs to be added to this driver
> > > in
> > > the first
> > > place, or if it could be added to pmbus.c instead. Any idea ?
> > 
> > Oh, we did wrote a standalone driver too, and it works fine.
> > Maybe it's better to upsteam it instead. :)
> 
> No, I meant if it would make sense to just add something like
> 
>         {"xdpe11280", (kernel_ulong_t)&pmbus_info_one },
> 
> to drivers/hwmon/pmbus/pmbus.c.
> 
> You only really need a standalone driver if it does something
> special, such as a workaround for some register access (like
> the xdpe12284 driver), or if support for manufacturer specific
> registers is desired or needed. That would, for example, be useful
> if the xdpe11280 supports per-phase sensors.
> 
> Thanks,
> Guenter

Hi,

I tested if the xdpe11280 can use the generic pmbus driver. Everything
works fine except it does only detect READ_TEMPERATURE_1 on page 0.
Looking at the pmbus_find_sensor_groups function it looks like only
some commands are probed on each page (READ_VOUT, READ_IOUT, and
READ_POUT) but not READ_TEMPERATURE_1.
The PMBus spec 1.3.1 tells us: "Each page may offer the full range of
PMBus commands available for each output or non-PMBus device." How
could we adapt the generic driver so that it is possible to probe
commands for each page?

Furthermore, It would be great to add regulator and DT support. I
created a WIP branch on GitHub with a possible way to implement this:
https://github.com/9elements/linux/tree/upstreaming_pmbus_regulator_wip

What do you think?

Thanks,
Marcello 


  reply	other threads:[~2022-02-21 12:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-17 14:41 [PATCH v2 0/3] Support XDPE112 Marcello Sylvester Bauer
2022-02-17 14:41 ` [PATCH v2 1/3] dt-bindings: trivial-devices: Add xdpe11280 Marcello Sylvester Bauer
2022-02-24 22:12   ` Rob Herring
2022-02-17 14:41 ` [PATCH v2 2/3] hwmon (xdpe12284): Add support for xdpe11280 Marcello Sylvester Bauer
2022-02-17 15:20   ` Guenter Roeck
2022-02-17 16:39     ` sylv
2022-02-17 18:11       ` Guenter Roeck
2022-02-17 18:38         ` sylv
2022-02-17 19:25           ` Guenter Roeck
2022-02-21 12:13             ` sylv [this message]
2022-02-25 16:39               ` Guenter Roeck
2022-02-26 15:32                 ` Marcello Sylvester Bauer
2022-02-17 14:41 ` [PATCH v2 3/3] hwmon (xdpe12284): Add regulator support Marcello Sylvester Bauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=337fe0598837b35ee96773339e9cdc8345a7c16e.camel@sylv.io \
    --to=sylv@sylv.io \
    --cc=corbet@lwn.net \
    --cc=jdelvare@suse.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=patrick.rudolph@9elements.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).