linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Vadim Pasternak <vadimp@mellanox.com>
Cc: "robh+dt@kernel.org" <robh+dt@kernel.org>,
	"vijaykhemka@fb.com" <vijaykhemka@fb.com>,
	"linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Michael Shych <michaelsh@mellanox.com>
Subject: Re: [RFC PATCH hwmon-next v1 5/5] hwmon: (pmbus/tps53679) Extend device list supported by driver
Date: Wed, 8 Jan 2020 08:47:48 -0800	[thread overview]
Message-ID: <20200108164748.GD28993@roeck-us.net> (raw)
In-Reply-To: <AM6PR05MB5224C166E608C3BBD09E4606A23E0@AM6PR05MB5224.eurprd05.prod.outlook.com>

On Wed, Jan 08, 2020 at 02:10:50PM +0000, Vadim Pasternak wrote:
> 
> Hi Guenter,
> 
> We are looking for possibility to provide some kind of flexible driver to handle
> different devices from different vendors, but which have common nature,
> like support of two pages for telemetry with same set of functions and same
> formats. (Actually driver could be flexible regarding the number of pages).
> 
> While the difference only in VID codes mapping.
> 
> The motivation for that is to give free hand to HW design to choose which
> particular device to use on the same system type.
> There are two main reasons for such requirement:
> - Quality of device (we already had a serios problems with ucd9224 and
>   tps53679, caused system meltdown). In such case the intention is to move
>   to fallback devices in the next batches.
> - Device availability in stock. Sometimes vendors can't supply in time the
>    necessary quantity.
> 
> Currently there are the devices from three vendor: TI tps536xx, Infineon
> xdpe122 and MPS mp2975.
> All have different mapping of VID codes.
> 
> It could be also few additional devices, which are supposed to be used as
> fallback devices.
> 
> We have several very big customers ordering now huge quantity of our
> systems, which are very conservative regarding image upgrade.
> Means we can provide now support for tps536xx, xdpe122xx and mp2975
> but in case new devices are coming soon, we will be able to support it in kernel
> for their image after year or even more.
> 
> We can provide ACPI pmbus driver, which will read VID mapping from ACPI
> DSDT table. This mapping table will contain the names of available modes
> and specific vendor code for this mode. Like:
> PMBVR11=1
> PMBVR12=2
> PMBVR13=5
> PMBIMVP9=10
> And driver will set info->vrm_version[i] according to this mapping.
> 

The DSDT would have to provide all properties, not just the VID modes.
At the very least that would have to be the number of pages, data formats,
vrm version, and the supported attributes per page. It should be possible
to also add m/b/R information for each of the sensor classes, but I guess
the actual implementation could be postponed until it is needed.

This could all be done through the existing generic driver (pmbus.c);
it would not really require a new driver. ACPI/DSDT could provide firmware
properties, and pmbus.c could read those using device_property API
functions (eg device_property_read_u32(dev, "vrm-mode")). Would that work
for you ?

Thanks,
Guenter

  reply	other threads:[~2020-01-08 16:47 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-05 10:58 [RFC PATCH hwmon-next v1 0/5] hwmon: (pmbus) Add support for vid mode calculation per page bases Vadim Pasternak
2020-01-05 10:58 ` [RFC PATCH hwmon-next v1 1/5] hwmon: (pmbus/core) Add support for vid mode detection " Vadim Pasternak
2020-01-05 10:58 ` [RFC PATCH hwmon-next v1 2/5] hwmon: (pmbus/core) Add support for Intel IMVP9 specification Vadim Pasternak
2020-01-05 16:26   ` Guenter Roeck
2020-01-05 17:15     ` Vadim Pasternak
2020-01-06 12:14     ` Vadim Pasternak
2020-01-05 10:58 ` [RFC PATCH hwmon-next v1 3/5] hwmon: (pmbus/tps53679) Allow " Vadim Pasternak
2020-01-05 10:58 ` [RFC PATCH hwmon-next v1 4/5] dt-bindings: Add TI and Infineon VR Controllers as trivial devices Vadim Pasternak
2020-01-05 10:58 ` [RFC PATCH hwmon-next v1 5/5] hwmon: (pmbus/tps53679) Extend device list supported by driver Vadim Pasternak
2020-01-05 16:03   ` Guenter Roeck
2020-01-05 16:44     ` Vadim Pasternak
2020-01-05 18:34       ` Guenter Roeck
2020-01-06 12:16         ` Vadim Pasternak
2020-01-06 14:52           ` Guenter Roeck
2020-01-06 16:57             ` Vadim Pasternak
2020-01-06 21:01               ` Guenter Roeck
2020-01-06 22:29                 ` Vadim Pasternak
2020-01-07  1:28                   ` Guenter Roeck
2020-01-07  6:06                     ` Vadim Pasternak
2020-01-07 12:14                       ` Guenter Roeck
2020-01-08 14:10                         ` Vadim Pasternak
2020-01-08 16:47                           ` Guenter Roeck [this message]
2020-01-13 12:25                             ` Vadim Pasternak
2020-01-13 20:56                               ` Guenter Roeck
2020-01-14  6:54                                 ` Vadim Pasternak
2020-01-14 14:19                                   ` Guenter Roeck
2020-01-16 19:54                                     ` Vadim Pasternak

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=20200108164748.GD28993@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=michaelsh@mellanox.com \
    --cc=robh+dt@kernel.org \
    --cc=vadimp@mellanox.com \
    --cc=vijaykhemka@fb.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).