[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230728082527.3531940-1-Naresh.Solanki@9elements.com>
Date: Fri, 28 Jul 2023 10:25:26 +0200
From: Naresh Solanki <naresh.solanki@...ements.com>
To: Guenter Roeck <linux@...ck-us.net>,
Jean Delvare <jdelvare@...e.com>,
krzysztof.kozlowski+dt@...aro.org
Cc: linux-hwmon@...r.kernel.org,
Patrick Rudolph <patrick.rudolph@...ements.com>,
Naresh Solanki <Naresh.Solanki@...ements.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH] hwmon: (pmbus/mp2975) Fix PGOOD in READ_STATUS_WORD
From: Patrick Rudolph <patrick.rudolph@...ements.com>
MPS returns PGOOD instead of PB_STATUS_POWER_GOOD_N.
Fix that in the read_word_data hook.
Signed-off-by: Patrick Rudolph <patrick.rudolph@...ements.com>
Signed-off-by: Naresh Solanki <Naresh.Solanki@...ements.com>
---
drivers/hwmon/pmbus/mp2975.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/hwmon/pmbus/mp2975.c b/drivers/hwmon/pmbus/mp2975.c
index 28f33f4618fa..410b6eae6d02 100644
--- a/drivers/hwmon/pmbus/mp2975.c
+++ b/drivers/hwmon/pmbus/mp2975.c
@@ -297,6 +297,10 @@ static int mp2973_read_word_data(struct i2c_client *client, int page,
int ret;
switch (reg) {
+ case PMBUS_STATUS_WORD:
+ 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));
base-commit: a4bb1ce5b9e3ca403c04e20ebeae77fd6447cb11
--
2.41.0
Powered by blists - more mailing lists