History log of /openbmc/phosphor-hwmon/start_hwmon.sh.in (Results 1 – 2 of 2)
Revision Date Author Comments
# 670d92a7 22-Jul-2024 Matt Spinler <spinler@us.ibm.com>

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 d

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>

show more ...


# 24b8b4be 07-Aug-2023 Willy Tu <wltu@google.com>

Add option to override of_node to use devpath

Allow us to force phosphor-hwmon to use the devpath to detect even if
the of_name exists. Some system may not be setup properly to have the
hwmon setup

Add option to override of_node to use devpath

Allow us to force phosphor-hwmon to use the devpath to detect even if
the of_name exists. Some system may not be setup properly to have the
hwmon setup matching what we needed. This allow us to have the
flexibility to override some config if we are not able to fix it on the
driver side.

The linux change in
https://github.com/torvalds/linux/commit/2315332efcbe7124252f080e03b57d3d2f1f4771
create the of_node to the device's ancestor instead of having it
missing. This forces multiple devices to be linked to the same node.
This required a single config to support multiple different type of
devices.

This change allow us to avoid that if it is not feasible to fix the
issue on the driver side.

Tested:
Override the devices with devpath only and didn't break other devices.

```
meson build -Doverride-with-devpath=nodeA,nodeB
```

with this if the `of_fullname` has a filename ended with nodeA or
nodeB, then it will not use the `of_fullname` and use the devpath
instead.

Change-Id: I76d05f0cf2aa8de3b7efadea8eb513f4708f049b
Signed-off-by: Willy Tu <wltu@google.com>

show more ...