kernel_samsung_a53x/drivers/hwmon/pmbus
Patryk Biel 32dddc06e5 hwmon: (pmbus) Conditionally clear individual status bits for pmbus rev >= 1.2
[ Upstream commit 20471071f198c8626dbe3951ac9834055b387844 ]

The current implementation of pmbus_show_boolean assumes that all devices
support write-back operation of status register to clear pending warnings
or faults. Since clearing individual bits in the status registers was only
introduced in PMBus specification 1.2, this operation may not be supported
by some older devices. This can result in an error while reading boolean
attributes such as temp1_max_alarm.

Fetch PMBus revision supported by the device and modify pmbus_show_boolean
so that it only tries to clear individual status bits if the device is
compliant with PMBus specs >= 1.2. Otherwise clear all fault indicators
on the current page after a fault status was reported.

Fixes: 35f165f08950a ("hwmon: (pmbus) Clear pmbus fault/warning bits after read")
Signed-off-by: Patryk Biel <pbiel7@gmail.com>
Message-ID: <20240909-pmbus-status-reg-clearing-v1-1-f1c0d68c6408@gmail.com>
[groeck:
 Rewrote description
 Moved revision detection code ahead of clear faults command
 Assigned revision if return value from PMBUS_REVISION command is 0
 Improved return value check from calling _pmbus_write_byte_data()]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:21:12 +01:00
..
adm1266.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adm1275.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bel-pfe.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ibm-cffps.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
inspur-ipsps.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ir35221.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ir38064.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irps5401.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
isl68137.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lm25066.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc2978.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc3815.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max8688.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max16064.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max16601.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max20730.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max20751.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max31785.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max34440.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mp2975.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pmbus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pmbus.h hwmon: (pmbus) Conditionally clear individual status bits for pmbus rev >= 1.2 2024-11-23 23:21:12 +01:00
pmbus_core.c hwmon: (pmbus) Conditionally clear individual status bits for pmbus rev >= 1.2 2024-11-23 23:21:12 +01:00
pxe1610.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tps40422.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tps53679.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ucd9000.c hwmon: (pmbus/ucd9000) Increase delay from 250 to 500us 2024-11-19 11:32:49 +01:00
ucd9200.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xdpe12284.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zl6100.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00