diff options
author | Vincent Whitchurch <vincent.whitchurch@axis.com> | 2023-09-15 10:02:14 +0300 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2023-09-15 22:41:57 +0300 |
commit | 58e4aacb746321d8692996f40a1dcfb9e8b34c23 (patch) | |
tree | 3d2b4d952b0df28132658d846f5ea8cab03c6f49 /Documentation | |
parent | c75f4bf6800bde67df22ac95139279ec8764118a (diff) | |
download | linux-58e4aacb746321d8692996f40a1dcfb9e8b34c23.tar.xz |
power: supply: Propagate of_node to child device
Ensure that the dynamically created power supply device sets its
->of_node if the driver supplies one. This brings it in line with
several other subsystems (see git grep 'of_node =.*parent.*of_node') and
allows easier identification of the device from udev rules and similar.
Before this patch:
/sys/class/power_supply# ls -l bq256xx-battery/of_node
ls: cannot access 'bq256xx-battery/of_node': No such file or directory
# ls -l bq256xx-battery/hwmon1/of_node
ls: cannot access 'bq256xx-battery/hwmon1/of_node': No such file or directory
After:
/sys/class/power_supply# ls -l bq256xx-battery/of_node
lrwxrwxrwx 1 root root 0 May 17 09:14 bq256xx-battery/of_node ->
../../../../../../../../firmware/devicetree/base/virtio@1/i2c/bq25619@09
# ls -l bq256xx-battery/hwmon1/of_node
lrwxrwxrwx 1 root root 0 May 17 09:14 bq256xx-battery/hwmon1/of_node ->
../../../../../../../../../firmware/devicetree/base/virtio@1/i2c/bq25619@09
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Link: https://lore.kernel.org/r/20230915-power-of-v2-1-ca54c441867e@axis.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions