Re: [PATCH v5 0/2] dt-bindings: hwmon: pmbus: add bindings for isl68137

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/29/24 09:32, Grant Peltier wrote:
On Mon, Oct 28, 2024 at 11:18:39AM +0100, Geert Uytterhoeven wrote:
v4:
- Revert devicetree property name to "vout-voltage-divider" and refactor
   property description and driver implementation to match existing
   vout-voltage-divider implementation in max20730 as no suitable generic
   voltage divider schema exists.

Can you please elaborate (or point to the email that did so, in case
I missed it)?

In reply to v2, Günter wrote:

    "I would prefer, in the order of preference,

     1) an applicable generic property definition
     2) a definition that is already used elsewhere
     3) a new chips specific definition"

https://lore.kernel.org/all/3f460b62-4cd1-49dd-a98b-1fbcfdbd3af0@xxxxxxxxxxxx

Thanks!

Gr{oetje,eeting}s,

                         Geert


Hi Geert,

After looking through existing bindings definitions, the only generic
voltage divider property that I found was one that is intended to scale
voltages for IIO io-channels. However, the use case here is to scale
particular hwmon PMBus telemetry, which most closely matches the existing
implementation of the vout-voltage-divider property in the max20730
driver so I opted to copy that implementation based on Guenter's
preferences. Is there something that I missed or more information that
you are looking for?


I had a look myself. I agree with Grant, the existing bindings are really
not a good match. They are directly tied to iio, the implementation in
drivers/iio/afe/iio-rescale.c is completely iio specific, and I see
no means to use it for anything but iio. The problem is that it is
a "compatible" property, not parameter property (or set of properties)
as I would have expected [sorry if I use the wrong terminology].

We could possibly use the actual properties, "output-ohms" and "full-ohms",
but I am not really sure if that makes too much sense.

Note that there are a variety of voltage divider properties.

gw,voltage-divider-ohms
lltc,fb-voltage-divider
mps,fb-voltage-divider
vout-voltage-divider

All those specify a pair of resistors. I think that model is much better
suited to the problem at hand than a "compatible".

I agree though that this should be explained in the patch description.

Guenter





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux