Userspace matching of hwmon devices to hardware
Lei YU
mine260309 at gmail.com
Mon Mar 25 19:21:42 AEDT 2019
This email is to ask/discuss if there is a stable path/name (or whatever) for
hwmon devices in the different versions of kernels.
In OpenBMC, the service phosphor-hwmon reads the sensors' value and expose to
DBus, depending on a configure file that matches the device tree path.
The service is started by udev rule, called with the DEVPATH and OF_FULLNAME,
so it knows where to find the configure file depending on DEVPATH or
OF_FULLNAME.
E.g. on Romulus BMC, the w83773 sensor has OF_FULLNAME at
/ahb/apb/i2c at 1e78a000/i2c-bus at 440/w83773g at 4c,
and the service knows the config is matched from path
/etc/default/obmc/hwmon/ahb/apb/i2c at 1e78a000/i2c-bus at 440/w83773g at 4c.conf
However, the DEVPATH or OF_FULLNAME is not stable in different kernels:
* In 4.1x kernel, the path is as above.
* In 5.0 kernel, "i2c at 1e78a000" is changed to "bus at 1e78a000" in the path.
This breaks the userspace's phosphor-hwmon.
If we fix the issue by updating the configure files' path in userspace, it
means the userspace only with the new 5.x kernel.
So the question here is, it there a stable way for userspace to match a hwmon
device?
Thanks!
--
BRs,
Lei YU
More information about the openbmc
mailing list