Re: [PATCH 1/3] hwmon: pmbus: event notification with alarms
Vincent Jardin <[email protected]>
| Newsgroups | org.kernel.vger.linux-hwmon,dev.linux.lists.sashiko-reviews,org.kernel.vger.linux-devicetree |
|---|---|
| Message-ID | <[email protected]> |
Hi again,
Le 23/07/26 16:28, Vincent Jardin a écrit :
> Hi Mr. Bot,
>
> > This is a pre-existing issue, but while looking at how hwmon devices are
> > exposed for alarm notification, I noticed that pmbus_notify() might be
> > sending notifications to the wrong kobject:
> >
> > drivers/hwmon/pmbus/pmbus_core.c:pmbus_notify() {
> > ...
> > sysfs_notify(&data->dev->kobj, NULL, da->attr.name);
> > kobject_uevent(&data->dev->kobj, KOBJ_CHANGE);
> > ...
> > }
> >
> > Since the hwmon attributes are attached to the hwmon device rather than the
> > parent I2C device, does sysfs_notify() fail to find the attribute and return
> > silently?
> ...
> > Would it make sense to update pmbus_notify() to use data->hwmon_dev->kobj
> > instead to ensure poll() and udev events work correctly?
>
> OK, I'll fix in v2's 1/4, wait for the next,
> "hwmon: (pmbus/core) notify on the hwmon device, not the i2c client",
> both sysfs_notify() and kobject_uevent() will target data->hwmon_dev->kobj.
in fact, I'll send a specific fix for it to avoid confusions.
> > --
> > Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
>