Message ID | cover.1729874904.git.grantpeltier93@gmail.com (mailing list archive) |
---|---|
Headers | show |
Series | dt-bindings: hwmon: pmbus: add bindings for isl68137 | expand |
Hi Grant, On Fri, Oct 25, 2024 at 7:16 PM Grant Peltier <grantpeltier93@gmail.com> wrote: > Renesas digital multiphase voltage regulators are capable of regulating > output voltages that exceed the range that their Vsense pins can detect. > In such applications, users may place a voltage divider between Vout and > the Vsense pin for a given rail. However, the driver currently has no > way of knowing if a voltage divider is being used which results in > erroneous telemetry being reported over hwmon. > > This patch set defines a devicetree bindings schema for Renesas digital > multiphase voltage regulators that are supported by the isl68137 driver > to allow users to add voltage divider definitions for any rail powered > by the device. This patch set also includes the required changes to the > isl68137 driver to enable scaling Vout/Pout telemetry for rails with a > defined voltage divider. > > v5: > - Fix clang compilation errors related to C23 syntax Thanks for the update! > 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@roeck-us.net Thanks! Gr{oetje,eeting}s, Geert
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@roeck-us.net > > 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? Thanks, Grant
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@roeck-us.net >> >> 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