mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 14:04:27 -04:00
hwmon: (pmbus/core) notify on the hwmon device, not the i2c client
pmbus_notify() calls sysfs_notify() and kobject_uevent() on the i2c
client's kobject, but the alarm attributes live on the hwmon class
device registered by pmbus_do_probe(). Notifying the parent i2c device
is a no-op for both poll(POLLPRI) waiters and udev listeners: the named
attribute does not exist on that kobject.
Notify the hwmon device instead, so poll() wakes up and "change"
uevents fire on the inX_alarm/tempX_alarm attributes when SMBALERT#
reports a fault.
Fixes: f469bde9af ("hwmon: (pmbus/core) Notify hwmon events")
Cc: stable@vger.kernel.org # v6.4+
Signed-off-by: Vincent Jardin <vjardin@free.fr>
Link: https://lore.kernel.org/r/20260723-fix_hwmon_notify_v1-v1-1-5a24c528686d@free.fr
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
committed by
Guenter Roeck
parent
b0e8adb2cc
commit
a64a7e8a0b
@@ -2985,8 +2985,9 @@ static void pmbus_notify(struct pmbus_data *data, int page, int reg, int flags)
|
||||
|
||||
if (reg == sreg && page == spage && (smask & flags)) {
|
||||
dev_dbg(data->dev, "sysfs notify: %s", da->attr.name);
|
||||
sysfs_notify(&data->dev->kobj, NULL, da->attr.name);
|
||||
kobject_uevent(&data->dev->kobj, KOBJ_CHANGE);
|
||||
sysfs_notify(&data->hwmon_dev->kobj, NULL,
|
||||
da->attr.name);
|
||||
kobject_uevent(&data->hwmon_dev->kobj, KOBJ_CHANGE);
|
||||
flags &= ~smask;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user