linux/drivers/hwmon/pmbus
Jerome Brunet 7458e82c84 hwmon: (pmbus/core) clear faults after setting smbalert mask
[ Upstream commit 509c3a3626 ]

pmbus_write_smbalert_mask() ignores the errors if the chip can't set
smbalert mask the standard way. It is not necessarily a problem for the irq
support if the chip is otherwise properly setup but it may leave an
uncleared fault behind.

pmbus_core will pick the fault on the next register_check(). The register
check will fails regardless of the actual register support by the chip.

This leads to missing attributes or debugfs entries for chips that should
provide them.

We cannot rely on register_check() as PMBUS_SMBALERT_MASK may be read-only.

Unconditionally clear the page fault after setting PMBUS_SMBALERT_MASK to
avoid the problem.

Suggested-by: Guenter Roeck <linux@roeck-us.net>
Fixes: 221819ca4c ("hwmon: (pmbus/core) Add interrupt support")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Message-ID: <20241105-tps25990-v4-5-0e312ac70b62@baylibre.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-12-05 14:01:20 +01:00
..
acbel-fsg032.c hwmon: (pmbus/acbel-fsg032) Add firmware version debugfs attribute 2023-08-21 06:04:29 -07:00
adm1266.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
adm1275.c hwmon: (pmbus/adm1275) add adm1281 support 2024-04-28 10:08:43 -07:00
adp1050.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
bel-pfe.c hwmon: (pmbus/bel-pfe) Enable PMBUS_SKIP_STATUS_CHECK for pfe1100 2023-08-06 06:22:33 -07:00
bpa-rs600.c hwmon: Switch i2c drivers back to use .probe() 2023-06-08 06:41:17 -07:00
delta-ahe50dc-fan.c hwmon: Switch i2c drivers back to use .probe() 2023-06-08 06:41:17 -07:00
dps920ab.c hwmon: Explicitly include correct DT includes 2023-08-21 06:04:29 -07:00
fsp-3y.c hwmon: Switch i2c drivers back to use .probe() 2023-06-08 06:41:17 -07:00
ibm-cffps.c hwmon: (pmbus/ibm-cffps) fix Wvoid-pointer-to-enum-cast warning 2023-08-21 06:04:31 -07:00
inspur-ipsps.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
ir35221.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
ir36021.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
ir38064.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
irps5401.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
isl68137.c hwmon: Switch i2c drivers back to use .probe() 2023-06-08 06:41:17 -07:00
Kconfig hwmon: add MP5920 driver 2024-07-02 12:36:31 -07:00
lm25066.c hwmon: (pmbus/lm25066) Let enum chips start with index 0 2024-06-11 07:25:13 -07:00
lt7182s.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
ltc2978.c hwmon: Switch i2c drivers back to use .probe() 2023-06-08 06:41:17 -07:00
ltc3815.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
ltc4286.c hwmon: (pmbus/ltc4286) Drop unused i2c device ids 2024-07-10 07:11:34 -07:00
Makefile hwmon: add MP5920 driver 2024-07-02 12:36:31 -07:00
max8688.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
max15301.c hwmon: pmbus: max15301: Use generic code 2024-09-02 07:34:02 -07:00
max16064.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
max16601.c hwmon: (pmbus/max16601) Add support for new revisions of MAX16508 2023-06-10 08:28:14 -07:00
max20730.c hwmon: (max20730) fix Wvoid-pointer-to-enum-cast warning 2023-08-21 06:04:31 -07:00
max20751.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
max31785.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
max34440.c hwmon: Switch i2c drivers back to use .probe() 2023-06-08 06:41:17 -07:00
mp2856.c hwmon: (pmbus/mp2856) Let enum chips start with index 0 2024-06-11 07:25:13 -07:00
mp2888.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
mp2891.c hwmon: add MP2891 driver 2024-06-28 10:27:47 -07:00
mp2975.c hwmon: (pmbus/mp2975) Use i2c_get_match_data() 2024-04-28 10:08:33 -07:00
mp2993.c hwmon: add MP2993 driver 2024-06-12 08:59:44 -07:00
mp5023.c hwmon: Explicitly include correct DT includes 2023-08-21 06:04:29 -07:00
mp5920.c hwmon: add MP5920 driver 2024-07-02 12:36:31 -07:00
mp5990.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
mp9941.c hwmon: add MP9941 driver 2024-06-12 22:39:34 -07:00
mpq7932.c hwmon: (pmbus/mpq7932) Constify struct regulator_desc 2024-09-08 16:37:51 -07:00
mpq8785.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
pim4328.c hwmon: Switch i2c drivers back to use .probe() 2023-06-08 06:41:17 -07:00
pli1209bc.c hwmon: pmbus: pli12096bc: Add write delay 2024-09-02 07:34:03 -07:00
pm6764tr.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
pmbus.c hwmon: Switch i2c drivers back to use .probe() 2023-06-08 06:41:17 -07:00
pmbus.h hwmon updates for v6.12 2024-09-18 12:40:48 +02:00
pmbus_core.c hwmon: (pmbus/core) clear faults after setting smbalert mask 2024-12-05 14:01:20 +01:00
pxe1610.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
q54sj108a2.c hwmon: Explicitly include correct DT includes 2023-08-21 06:04:29 -07:00
stpddc60.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
tda38640.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
tps546d24.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
tps40422.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
tps53679.c hwmon: (pmbus/tps53679) fix Wvoid-pointer-to-enum-cast warning 2023-08-21 06:04:31 -07:00
ucd9000.c hwmon: pmbus: ucd9000: Use generic code 2024-09-02 07:34:02 -07:00
ucd9200.c hwmon: (pmbus/ucd9200) fix Wvoid-pointer-to-enum-cast warning 2023-08-21 06:04:31 -07:00
xdp710.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
xdpe152c4.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
xdpe12284.c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-01 07:47:49 -07:00
zl6100.c hwmon: pmbus: zl6100: Use generic code 2024-09-02 07:34:03 -07:00