hwmon: (pmbus/mp2975) Simplify VOUT code
authorPatrick Rudolph <patrick.rudolph@9elements.com>
Fri, 14 Jul 2023 13:51:12 +0000 (15:51 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 21 Aug 2023 13:04:29 +0000 (06:04 -0700)
commit1feb31e810b0634d962920b7c2ccb54d2817ba56
treec453936b5ccef9f1422b57e01c0da4c814382df6
parent1f6f34d08a95b953c58e1c7388a787e78d819c83
hwmon: (pmbus/mp2975) Simplify VOUT code

In order to upstream MP2973/MP2971 simplify the code by removing support
for various VOUT formats. The MP2973 and MP2971 supports all PMBUS
supported formats for VOUT, while the MP2975 only support DIRECT and
VID for VOUT.

In DIRECT mode all chips report the voltage in 1mV/LSB.

Configure the chip to use DIRECT format for VOUT and drop the code
conversion code for other formats. The to be added chips MP2973/MP2971
will be configured to also report VOUT in DIRECT format.

The maximum voltage that can be reported in DIRECT format is 32768mV.
This is sufficient as the maximum output voltage for VR12/VR13 is
3040 mV.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com>
Link: https://lore.kernel.org/r/20230714135124.2645339-4-Naresh.Solanki@9elements.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/mp2975.c