mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-09 18:00:17 +01:00
Some model-specific information isn't available through udev properties. This callout is used to query the device directly and set a property that we can then match on for the hwdb entries. This is geared for Elantech and ALPS touchpads where the firmware version is the interesting bit. The udev rule is added already to match on that, note that the callout doesn't do anything at this point. The various touchpad-related things will be added separately. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
42 lines
1.5 KiB
Text
42 lines
1.5 KiB
Text
# Do not edit this file, it will be overwritten on update
|
|
#
|
|
# This file contains lookup rules for libinput model-specific quirks.
|
|
# The contents of this file are a contract between libinput, udev rules and
|
|
# the hwdb.
|
|
# IT IS NOT A STABLE API AND SUBJECT TO CHANGE AT ANY TIME
|
|
#
|
|
# The hwdb database is in:
|
|
# 90-libinput-model-quirks.hwdb
|
|
|
|
ACTION!="add|change", GOTO="libinput_model_quirks_end"
|
|
KERNEL!="event*", GOTO="libinput_model_quirks_end"
|
|
|
|
# Touchpad firmware detection, two-stage process.
|
|
# First, run the program and import the LIBINPUT_MODEL_FIRMWARE_VERSION
|
|
# environment (if any)
|
|
KERNELS=="*input*", \
|
|
ENV{ID_INPUT_TOUCHPAD}=="1", \
|
|
IMPORT{program}="@UDEV_TEST_PATH@libinput-model-quirks %S%p"
|
|
|
|
# Second, match on anything with that env set and import from the hwdb
|
|
KERNELS=="*input*", \
|
|
ENV{ID_INPUT_TOUCHPAD}=="1", \
|
|
ENV{LIBINPUT_MODEL_FIRMWARE_VERSION}!="", \
|
|
IMPORT{builtin}="hwdb 'libinput:name:$attr{name}:fwversion:$env{LIBINPUT_MODEL_FIRMWARE_VERSION}'"
|
|
# End of touchpad firmware detection
|
|
|
|
# Matches below are exclusive, if one matches we skip the rest
|
|
# hwdb matches:
|
|
#
|
|
# libinput:touchpad:<modalias>
|
|
ENV{ID_INPUT_TOUCHPAD}=="1", \
|
|
IMPORT{builtin}="hwdb --subsystem=input --lookup-prefix=libinput:touchpad:", \
|
|
GOTO="libinput_model_quirks_end"
|
|
|
|
# libinput:name:<name>:dmi:<dmi string>
|
|
KERNELS=="input*", \
|
|
IMPORT{builtin}="hwdb 'libinput:name:$attr{name}:$attr{[dmi/id]modalias}'", \
|
|
GOTO="libinput_model_quirks_end"
|
|
|
|
|
|
LABEL="libinput_model_quirks_end"
|