Userspace matching of hwmon devices to hardware

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@1e78a000/i2c-bus@440/w83773g@4c,
and the service knows the config is matched from path
   /etc/default/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@440/w83773g@xxxxxxx

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@1e78a000" is changed to "bus@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



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux