| commit | 670d92a775a14148b582c479f1f5705e94167c8f | [log] [tgz] |
|---|---|---|
| author | Matt Spinler <spinler@us.ibm.com> | Mon Jul 22 15:52:02 2024 -0500 |
| committer | Matt Spinler <spinler@us.ibm.com> | Tue Jul 23 10:04:58 2024 -0500 |
| tree | a3ee440de8cbfb097394c2366e0c07a6b865d745 | |
| parent | 82f2db6e3946d011d3f81c3f2bfce9b9ae77f740 [diff] |
Provide option to always use device path
The application has the ability to use either the 'OF_FULLNAME' udev
environment variable or the udev device path as the path to the config
file, though it defaults to OF_FULLNAME if it's there.
The disadvantage of using OF_FULLNAME is that the file name then has to
match what someone manually typed into the device tree for the system,
for example mydevice@72.conf. The device path method, on the other
hand, has a file name that matches the stable I2C details, such as
7-0052.conf.
To force phosphor-hwmon to always use the device path for its config and
avoid being dependent on the device tree name, this commits adds a new
--always-use-devpath meson option.
When enabled, it add an '|| true' into the start_hwmon.sh script to
force it down the path to use the device path when starting the hwmon
service.
Tested:
When disabled, diffed start_hwmon.sh to that built from previous HEAD
and the files matched.
When enabled, start_hwmon.sh now has
```
if [ -z "${path}" ] || true
```
and app now uses device path for config file path.
Change-Id: I5a03ebb6e6e967bc663ec747941258173dfd3363
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Exposes generic hwmon entries as DBus objects. More information can be found at Sensor Architecture
To build this package, do the following steps:
To clean the repository run rm -rf build.
To enable the use of Linux features like cgroups prioritization and udev/systemd control, one instance of phosphor-hwmon is intended to be run per hwmon sysfs class instance.
This requires an algorithm for selecting a stable, well-known D-Bus busname.
The algorithm is <PREFIX>-<ID>.Hwmon<N> where PREFIX is a meson configurable prefix (BUSNAME_PREFIX=xyz.openbmc_project by default), ID is either a std::hash of the /sys/devices path backing the hwmon class instance or provided suffix value from the command line, and N is the implemented phosphor-hwmon D-Bus API version.