From 1603a4326a6e7e8197807f1330bd9b31f0634321 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Fri, 28 Apr 2017 15:32:59 +0200 Subject: 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 Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer --- udev/90-libinput-model-quirks.hwdb | 1 + udev/90-libinput-model-quirks.rules.in | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'udev') 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: # libinput:touchpad: # libinput:name::dmi: +# libinput:name::dt: # libinput:name::fwversion: # # 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::dt: +KERNELS=="input*", \ + IMPORT{builtin}="hwdb 'libinput:name:$attr{name}:dt:$attr{[devicetree/base]model}'" + LABEL="libinput_model_quirks_end" -- cgit v1.2.3