RE: [PATCH v2] hwmon: (pmbus/mp2975) Fix PGOOD in READ_STATUS_WORD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Naresh Solanki <naresh.solanki@xxxxxxxxxxxxx>
> Sent: Monday, 31 July 2023 12:22
> To: Guenter Roeck <linux@xxxxxxxxxxxx>; Jean Delvare <jdelvare@xxxxxxxx>
> Cc: Vadim Pasternak <vadimp@xxxxxxxxxx>; Patrick Rudolph
> <patrick.rudolph@xxxxxxxxxxxxx>; Naresh Solanki
> <Naresh.Solanki@xxxxxxxxxxxxx>; linux-hwmon@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx
> Subject: [PATCH v2] hwmon: (pmbus/mp2975) Fix PGOOD in
> READ_STATUS_WORD
> 
> From: Patrick Rudolph <patrick.rudolph@xxxxxxxxxxxxx>
> 
> MP2973 & MP2971 returns PGOOD instead of PB_STATUS_POWER_GOOD_N.
> Fix that in the read_word_data hook.
> MP2975 might be affected but needs verification.

Hi,

According to MP2975 regmap datasheet for STATUS_WORD, bit 11 reports:
 11	 POWER_GOOD_N	1’b0: PG is active.
				1’b1: PG not active has occurred
Is it the same what stays MP2971 and MP2973 docs?

Thanks,
Vadim.

> 
> Signed-off-by: Patrick Rudolph <patrick.rudolph@xxxxxxxxxxxxx>
> Signed-off-by: Naresh Solanki <Naresh.Solanki@xxxxxxxxxxxxx>
> ---
>  drivers/hwmon/pmbus/mp2975.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/hwmon/pmbus/mp2975.c
> b/drivers/hwmon/pmbus/mp2975.c index 28f33f4618fa..27bb39370662
> 100644
> --- a/drivers/hwmon/pmbus/mp2975.c
> +++ b/drivers/hwmon/pmbus/mp2975.c
> @@ -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 returns 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));
> 
> base-commit: cb7022b8976e3c4d12cea2e7bb820a2944e2fd7b
> --
> 2.41.0





[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux