mbox series

[v2,0/3] hwmon: (pmbus/ltc2978) Set voltage resolution

Message ID 20220610114732.2370242-1-marten.lindahl@axis.com (mailing list archive)
Headers show
Series hwmon: (pmbus/ltc2978) Set voltage resolution | expand

Message

Mårten Lindahl June 10, 2022, 11:47 a.m. UTC
Hi!

When checking if a regulator supports a voltage range, the regulator
needs to have support for listing the range or else -EINVAL will be
returned.

This support does not exist for the LTC2977 regulator, so this change
adds support for list voltage to the pmbus regulators by adding
regulator_list_voltage_linear to the pmbus_regulator_ops. It also
defines the voltage resolution for regulators LTC2972/LTC2974/LTC2975/
LTC2977/LTC2978/LTC2979/LTC2980/LTM2987 based on that they all have the
same stepwise 122.07uV resolution, and scales the resolution to a 1mV
resolution which is easier to handle.

These patches have been tested on an ARTPEC-8 developer board with a group
of LTC2977 power regulators.

Kind regards
Mårten Lindahl

Mårten Lindahl (3):
  hwmon: (pmbus) Introduce and use cached vout margins
  hwmon: (pmbus) Add list_voltage to pmbus ops
  hwmon: (pmbus/ltc2978) Set voltage resolution

 drivers/hwmon/pmbus/ltc2978.c    |  56 +++++++++++++++--
 drivers/hwmon/pmbus/pmbus_core.c | 104 ++++++++++++++++++++++++-------
 2 files changed, 134 insertions(+), 26 deletions(-)