[26b1cc1] | 1 | ########################################################################
|
---|
| 2 | #
|
---|
| 3 | # Description : 61-persistent-input.rules
|
---|
| 4 | #
|
---|
| 5 | # Authors : Based on Open Suse Udev Rules
|
---|
| 6 | # kay.sievers@suse.de and hare@suse.de
|
---|
| 7 | #
|
---|
| 8 | # Adapted to : Jim Gifford
|
---|
| 9 | # LFS
|
---|
| 10 | #
|
---|
| 11 | # Version : 00.01
|
---|
| 12 | #
|
---|
| 13 | # Notes :
|
---|
| 14 | #
|
---|
| 15 | ########################################################################
|
---|
| 16 |
|
---|
| 17 | ACTION!="add", GOTO="persistent_input_end"
|
---|
| 18 | SUBSYSTEM!="input", GOTO="persistent_input_end"
|
---|
| 19 | KERNEL=="input[0-9]*", GOTO="persistent_input_end"
|
---|
| 20 |
|
---|
| 21 | # usb devices
|
---|
[95756c0] | 22 | SUBSYSTEMS=="usb", IMPORT{program}="usb_id -x"
|
---|
| 23 | SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="01", ENV{ID_CLASS}="kbd"
|
---|
| 24 | SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="02", ENV{ID_CLASS}="mouse"
|
---|
[bda8cfb] | 25 |
|
---|
| 26 | # other devices
|
---|
[95756c0] | 27 | DRIVERS=="pcspkr", ENV{ID_CLASS}="spkr"
|
---|
| 28 | DRIVERS=="atkbd", ENV{ID_CLASS}="kbd"
|
---|
| 29 | DRIVERS=="psmouse", ENV{ID_CLASS}="mouse"
|
---|
| 30 | ATTRS{name}=="*dvb*|*DVB*|* IR *", ENV{ID_CLASS}="ir"
|
---|
| 31 | ATTRS{modalias}=="input:*-*a[068],*|input:*-*a*,[68],*m*", ATTRS{modalias}!="input:*-*k*14A,*r*", ENV{ID_CLASS}="joystick"
|
---|
[bda8cfb] | 32 |
|
---|
[95756c0] | 33 | # fill empty serial number
|
---|
| 34 | ENV{ID_CLASS}=="?*", ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial"
|
---|
[26b1cc1] | 35 |
|
---|
| 36 | # by-id links
|
---|
[95756c0] | 37 | KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_CLASS}"
|
---|
| 38 | KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{ID_CLASS}"
|
---|
[26b1cc1] | 39 |
|
---|
| 40 | # by-path
|
---|
[dfdebf6] | 41 | IMPORT{program}="path_id %p"
|
---|
[95756c0] | 42 | ENV{ID_PATH}=="?*", KERNEL=="mouse*|js*", SYMLINK+="input/by-path/$env{ID_PATH}-$env{ID_CLASS}"
|
---|
| 43 | ENV{ID_PATH}=="?*", KERNEL=="event*", SYMLINK+="input/by-path/$env{ID_PATH}-event-$env{ID_CLASS}"
|
---|
[26b1cc1] | 44 |
|
---|
| 45 | LABEL="persistent_input_end"
|
---|