udev: gpio-keys input driver should have class kbd
Is this reasonable?
----- Forwarded message from Frans Pop <[email protected]> -----
From: Frans Pop <[email protected]>
To: [email protected]
Subject: udev: gpio-keys input driver should have class kbd
clone 524505 -1
reassign -1 udev 0.140-1
retitle -1 udev: gpio-keys input driver should have class kbd severity -1 wishlist
block 524505 by -1
thanks
With udev 0.140 (or rather: sometime after 0.125) we've lost the persistent device symlink /dev/input/by-path/platform-gpio-keys-event- due to the following change in 60-persistent-input.rules which no longer allows an empty ID_CLASS:
-KERNEL=="event*", ENV{ID_PATH}=="?*", \
+KERNEL=="event*", ENV{ID_PATH}=="?*", ENV{ID_CLASS}=="?*", \
SYMLINK+="input/by-path/$env{ID_PATH}-event-$env{ID_CLASS}"This means that qcontrol in Debian unstable is now broken (see:
http://bugs.debian.org/524505).
It seems to me that the simplest solution is to let udev define a class for gpio-keys (kbd seems most logical), for example with the following change in 60-persistent-input.rules:
-DRIVERS=="atkbd", ENV{ID_CLASS}="kbd"
+DRIVERS=="atkbd|gpio-keys", ENV{ID_CLASS}="kbd"
We can then adjust qcontrol to use the new persistent device link.
If that change is acceptable, please also push it for udev upstream.
Thanks,
FJP
----- End forwarded message -----
Signature · 2 lines
ciao, Marco
Review
Quoted 13 lines · Marco d'Itri
Is this reasonable?
With udev 0.140 (or rather: sometime after 0.125) we've lost the persistent device symlink
/dev/input/by-path/platform-gpio-keys-event-due to the following change in 60-persistent-input.rules which no longer allows an emptyID_CLASS:It seems to me that the simplest solution is to let udev define a class for gpio-keys (kbd seems most logical), for example with the following change in 60-persistent-input.rules:
(quoted diff) +1
-1-DRIVERS="atkbd", ENV{ID_CLASS}="kbd" +DRIVERS="atkbd|gpio-keys", ENV{ID_CLASS}="kbd"
I guess, this is any key on a system board, and is not like the usual, pretty well defined "kbd".
For path links of platform devices, we should just create a:
/dev/input/by-path/platform-gpio-keys-event
link, which should be fine as long as there is only a single interface per platform device. USB devices should also be fine in having this link, because they include the interface number in the path name.
I've committed a change along with some other pending changes to the git repository.
Thanks,
Kay