]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (pmbus/ltc2978) Set voltage resolution
authorMårten Lindahl <marten.lindahl@axis.com>
Tue, 14 Jun 2022 09:51:44 +0000 (11:51 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 13 Jul 2022 15:38:20 +0000 (08:38 -0700)
commit569f791a7fefbf124eabc5a7c742b8cc5a58c6a1
tree356423d6cb1795e9f83e8c62a14d9099ea75651a
parentde8e097aea42c2e0e7850faf1c25942d57adb65d
hwmon: (pmbus/ltc2978) Set voltage resolution

The LTC2977 regulator does not set the regulator_desc .n_voltages value
which is needed in order to let the regulator core list the regulator
voltage range.

This patch defines a regulator_desc with a voltage range, and uses it
for defining voltage resolution for regulators LTC2972/LTC2974/LTC2975/
LTC2977/LTC2978/LTC2979/LTC2980/LTM2987 based on that they all have a 16
bit ADC with the same stepwise 122.07uV resolution. It also scales the
resolution to a 1mV resolution which is easier to handle.

Signed-off-by: Mårten Lindahl <marten.lindahl@axis.com>
Link: https://lore.kernel.org/r/20220614095144.3472305-1-marten.lindahl@axis.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/ltc2978.c
drivers/hwmon/pmbus/pmbus.h