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 <[email protected]>
Signed-off-by: Naresh Solanki <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[groeck: Rephrased description to indicate that MP2975 is likely not affected]
Signed-off-by: Guenter Roeck <[email protected]>
This commit is contained in:
Patrick Rudolph authored and Guenter Roeck committed 2023-08-21 06:04:30 -07:00
1 parent 45f154dc96
commit acda945afb
1 file changed
+5
+5
View File
@@ -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));