OSDN Git Service

hwmon: (pmbus/lm25066) Support configurable sense resistor values
authorZev Weiss <zev@bewilderbeest.net>
Tue, 28 Sep 2021 09:22:41 +0000 (02:22 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 12 Oct 2021 14:22:41 +0000 (07:22 -0700)
commit94ee5fcc240fe9ffdd1c3206a48d5bdf425ea478
tree547e55f847342927737e0f6bc6f01ada14760355
parentb7792f3ea3924a3534e392c1d9125fdc93a60d70
hwmon: (pmbus/lm25066) Support configurable sense resistor values

The appropriate mantissa values for the lm25066 family's direct-format
current and power readings are a function of the sense resistor
employed between the SENSE and VIN pins of the chip.  Instead of
assuming that resistance is always the same 1mOhm as used in the
datasheet, allow it to be configured via a device-tree property
("shunt-resistor-micro-ohms").

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Link: https://lore.kernel.org/r/20210928092242.30036-8-zev@bewilderbeest.net
[groeck: Fixed checkpatch warnings]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Documentation/hwmon/lm25066.rst
drivers/hwmon/pmbus/lm25066.c