Patch "hwmon: (pmbus) Clear pmbus fault/warning bits after read" has been added to the 5.10-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    hwmon: (pmbus) Clear pmbus fault/warning bits after read

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     hwmon-pmbus-clear-pmbus-fault-warning-bits-after-rea.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 46c167c04b7710cb955cbe9e0a5c478e95c8802a
Author: Vikash Chandola <vikash.chandola@xxxxxxxxxxxxxxx>
Date:   Tue Feb 22 13:12:53 2022 +0000

    hwmon: (pmbus) Clear pmbus fault/warning bits after read
    
    [ Upstream commit 35f165f08950a876f1b95a61d79c93678fba2fd6 ]
    
    Almost all fault/warning bits in pmbus status registers remain set even
    after fault/warning condition are removed. As per pmbus specification
    these faults must be cleared by user.
    Modify hwmon behavior to clear fault/warning bit after fetching data if
    fault/warning bit was set. This allows to get fresh data in next read.
    
    Signed-off-by: Vikash Chandola <vikash.chandola@xxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220222131253.2426834-1-vikash.chandola@xxxxxxxxxxxxxxx
    Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
index b0e2820a2d57..71798fde2ef0 100644
--- a/drivers/hwmon/pmbus/pmbus_core.c
+++ b/drivers/hwmon/pmbus/pmbus_core.c
@@ -898,6 +898,11 @@ static int pmbus_get_boolean(struct i2c_client *client, struct pmbus_boolean *b,
 		pmbus_update_sensor_data(client, s2);
 
 	regval = status & mask;
+	if (regval) {
+		ret = pmbus_write_byte_data(client, page, reg, regval);
+		if (ret)
+			goto unlock;
+	}
 	if (s1 && s2) {
 		s64 v1, v2;
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux