summaryrefslogtreecommitdiff
path: root/udev
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2017-04-28 15:32:59 +0200
committerPeter Hutterer <peter.hutterer@who-t.net>2017-06-07 09:32:24 +1000
commit1603a4326a6e7e8197807f1330bd9b31f0634321 (patch)
tree864b3bb0ee01da536de3e1239859d90b660d18db /udev
parentce12ea6f9a0062e9544092968f689759f4e774c6 (diff)
udev: Add support for device-tree-based model selection
This adds support for detecting input peripherals based on their name and the device-tree model of the device they're used with. This is mostly an equivalent to dmi-based model detection (e.g. on x86 devices) for device that use device-tree (e.g. on ARM devices). Note that this requires systemd updates, see https://github.com/systemd/systemd/pull/5837 Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'udev')
-rw-r--r--udev/90-libinput-model-quirks.hwdb1
-rw-r--r--udev/90-libinput-model-quirks.rules.in4
2 files changed, 5 insertions, 0 deletions
diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb
index 229fb1d..75b374d 100644
--- a/udev/90-libinput-model-quirks.hwdb
+++ b/udev/90-libinput-model-quirks.hwdb
@@ -12,6 +12,7 @@
# libinput:mouse:<modalias>
# libinput:touchpad:<modalias>
# libinput:name:<name>:dmi:<dmi string>
+# libinput:name:<name>:dt:<device-tree string>
# libinput:name:<name>:fwversion:<version>
#
# Sort by brand, model
diff --git a/udev/90-libinput-model-quirks.rules.in b/udev/90-libinput-model-quirks.rules.in
index ace2bf0..0813781 100644
--- a/udev/90-libinput-model-quirks.rules.in
+++ b/udev/90-libinput-model-quirks.rules.in
@@ -41,4 +41,8 @@ ENV{ID_INPUT_KEYBOARD}=="1", \
KERNELS=="input*", \
IMPORT{builtin}="hwdb 'libinput:name:$attr{name}:$attr{[dmi/id]modalias}'"
+# libinput:name:<name>:dt:<device-tree string>
+KERNELS=="input*", \
+ IMPORT{builtin}="hwdb 'libinput:name:$attr{name}:dt:$attr{[devicetree/base]model}'"
+
LABEL="libinput_model_quirks_end"