From: Paul Kocialkowski Date: Fri, 28 Apr 2017 13:32:59 +0000 (+0200) Subject: udev: Add support for device-tree-based model selection X-Git-Tag: 1.7.901~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1603a4326a6e7e8197807f1330bd9b31f0634321;p=platform%2Fupstream%2Flibinput.git 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 --- diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb index 229fb1de..75b374d6 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 ace2bf07..08137812 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"