mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
hwmon: (pmbus/mp2975) Move PGOOD fix
The PGOOD fix was intended for MP2973 & MP2971 & not for MP2975.
Fixes: acda945afb
("hwmon: (pmbus/mp2975) Fix PGOOD in READ_STATUS_WORD")
Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Link: https://lore.kernel.org/r/20231027103352.918895-1-naresh.solanki@9elements.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
parent
d621a46d05
commit
9da2901c47
@ -297,6 +297,11 @@ static int mp2973_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));
|
||||
@ -380,11 +385,6 @@ 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));
|
||||
|
Loading…
Reference in New Issue
Block a user