mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
Same approach as used in 70-mouse.rules, allow for a name-based match optionally combined with bus/vid/pid (which the existing modalias rule would already allow us anyway). Note that ID_BUS isn't assigned until after this rule has run so we need to use the id/bustype attribute directly. Related to https://github.com/systemd/systemd/issues/36677
20 lines
870 B
Plaintext
20 lines
870 B
Plaintext
# do not edit this file, it will be overwritten on update
|
|
|
|
ACTION=="remove", GOTO="id_input_end"
|
|
|
|
SUBSYSTEM=="input", ENV{ID_INPUT}=="", IMPORT{builtin}="input_id"
|
|
SUBSYSTEM=="input", IMPORT{builtin}="hwdb --subsystem=input --lookup-prefix=id-input:modalias:"
|
|
|
|
# id-input:<bus>:v<vid>p<pid>:name:<name>:*
|
|
KERNELS=="input*", ATTRS{id/bustype}=="0003", \
|
|
IMPORT{builtin}="hwdb 'id-input:usb:v$attr{id/vendor}p$attr{id/product}:name:$attr{name}:'", \
|
|
GOTO="id_input_end"
|
|
KERNELS=="input*", ATTRS{id/bustype}=="0005", \
|
|
IMPORT{builtin}="hwdb 'id-input:bluetooth:v$attr{id/vendor}p$attr{id/product}:name:$attr{name}:'", \
|
|
GOTO="id_input_end"
|
|
KERNELS=="input*", ATTRS{id/bustype}=="0018", \
|
|
IMPORT{builtin}="hwdb 'id-input:i2c:v$attr{id/vendor}p$attr{id/product}:name:$attr{name}:'", \
|
|
GOTO="id_input_end"
|
|
|
|
LABEL="id_input_end"
|