Re: [PATCH 4/6] hwmon: (pmbus/max20830): add VOUT feedback resistor scaling support
From: Guenter Roeck
Date: Tue Jun 30 2026 - 11:40:57 EST
On 6/30/26 01:07, Torreno, Alexis Czezar wrote:
[External]
On 6/29/26 19:46, Alexis Czezar Torreno wrote:
Implement support for external voltage divider scaling using the
adi,vout-rfb1-ohms and adi,vout-rfb2-ohms device tree properties.
When the desired output voltage exceeds VREF, a resistor divider
(RFB1 and RFB2) is used to scale down the feedback voltage. The driver
reads these resistor values from device tree and applies the scaling
formula: VOUT_actual = VOUT_measured × (1 + RFB1/RFB2)
The properties are optional. If not specified, the driver assumes no
voltage divider is present and reports the raw VOUT reading.
This will require a detailed explanation why only PMBUS_READ_VOUT would
require scaling but not any of the other vout related commands.
Guenter
Will add it.
For reference, the device only has 3 vout related commands. The other 2
is referred to a feedback/reference voltage rather than a scaled output value.
Hence only read_vout has scaling.
The other two commands are VOUT_COMMAND and VOUT_MAX. While they are currently
not used, VOUT_COMMAND _would_ be used if someone adds regulator support to the
driver in the future. Thus, even though those two commands are currently not
used, you have to at least add a note into the driver that the register values
will have to be adjusted if regulator support is added to the driver in the
future.
Thanks,
Guenter