udev: derive path ID for PNP devices from ACPI firmware node

PNP devices may represent ACPI-enumerated hardware but do not have a
parent type supported by path_id. Consequently, importing path_id fails
even when the PNP device exposes a stable ACPI firmware_node. This also
prevents later assignments in rules such as the systemd-backlight
activation rule from taking effect.

Resolve the PNP device's firmware_node and use its ACPI sysname for the
path component. This gives PNP-backed devices the same stable identity
as their firmware representation.

Add a regression test using an RTC device below a PNP parent with an
ACPI firmware node.
This commit is contained in:
Andre Eikmeyer
2026-08-03 13:54:17 +09:00
committed by Yu Watanabe
parent b6fba48f0f
commit 6044c31038
3 changed files with 40 additions and 0 deletions
+1
View File
@@ -10584,6 +10584,7 @@ f('sys/devices/pnp0/00:07/rtc/rtc0/name', 0o644, b'rtc_cmos\n')
f('sys/devices/pnp0/00:07/rtc/rtc0/time', 0o644, b'02:30:51\n')
f('sys/devices/pnp0/00:07/rtc/rtc0/uevent', 0o644, b'''MAJOR=253
MINOR=0
DEVNAME=rtc0
''')
d('sys/devices/pnp0/00:07/rtc/rtc0/power', 0o755)
f('sys/devices/pnp0/00:07/rtc/rtc0/power/wakeup', 0o644, b'\n')