diff options
author | Patrick Rudolph <patrick.rudolph@9elements.com> | 2023-07-31 12:22:04 +0300 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2023-08-21 16:04:30 +0300 |
commit | acda945afb465e2a2c436623a35203d63994441f (patch) | |
tree | 282218c0b42e218c89713cce89c51a8beab0b5d3 /drivers/hwmon/pmbus/mp2975.c | |
parent | 45f154dc966322948725af1004f53a5531f03b7f (diff) | |
download | linux-acda945afb465e2a2c436623a35203d63994441f.tar.xz |
hwmon: (pmbus/mp2975) Fix PGOOD in READ_STATUS_WORD
MP2973 & MP2971 return PGOOD instead of PB_STATUS_POWER_GOOD_N.
Fix that in the read_word_data hook.
MP2975 should not be affected, but that has not been confirmed with
hardware.
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com>
Link: https://lore.kernel.org/r/20230731092204.2933045-1-Naresh.Solanki@9elements.com
[groeck: Rephrased description to indicate that MP2975 is likely not affected]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/pmbus/mp2975.c')
-rw-r--r-- | drivers/hwmon/pmbus/mp2975.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/hwmon/pmbus/mp2975.c b/drivers/hwmon/pmbus/mp2975.c index 28f33f4618fa..26ba50633100 100644 --- a/drivers/hwmon/pmbus/mp2975.c +++ b/drivers/hwmon/pmbus/mp2975.c @@ -380,6 +380,11 @@ static int mp2975_read_word_data(struct i2c_client *client, int page, int ret; switch (reg) { + case PMBUS_STATUS_WORD: + /* MP2973 & MP2971 return PGOOD instead of PB_STATUS_POWER_GOOD_N. */ + ret = pmbus_read_word_data(client, page, phase, reg); + ret ^= PB_STATUS_POWER_GOOD_N; + break; case PMBUS_OT_FAULT_LIMIT: ret = mp2975_read_word_helper(client, page, phase, reg, GENMASK(7, 0)); |