diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2017-04-19 13:45:34 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2017-04-26 12:38:15 +1000 |
commit | 8d5f4decb4086e2b7982c3cd1e24afd9c11f551f (patch) | |
tree | d2733cf0055bbb6c9d6929dee395c59f197f1715 /udev | |
parent | 2d96d8f97c94eb5f0633962410129ec9cffc3aae (diff) |
touchpad: move the pressure range to a hwdb entry
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'udev')
-rw-r--r-- | udev/90-libinput-model-quirks.hwdb | 2 | ||||
-rwxr-xr-x | udev/parse_hwdb.py | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb index 5370e36..3ae7a49 100644 --- a/udev/90-libinput-model-quirks.hwdb +++ b/udev/90-libinput-model-quirks.hwdb @@ -88,6 +88,7 @@ libinput:name:* Touchpad:dmi:*svnDellInc.:* ########################################## libinput:name:*ETPS/2 Elantech Touchpad*:dmi:* LIBINPUT_ATTR_RESOLUTION_HINT=31x31 + LIBINPUT_ATTR_PRESSURE_RANGE=24:10 LIBINPUT_MODEL_ELANTECH_TOUCHPAD=1 ########################################## @@ -114,6 +115,7 @@ libinput:name:Atmel maXTouch Touchpad:dmi:*svn*GOOGLE*:pn*Samus* libinput:name:Cypress APA Trackpad ?cyapa?:dmi:* LIBINPUT_MODEL_CYAPA=1 + LIBINPUT_ATTR_PRESSURE_RANGE=10:8 ########################################## # HP diff --git a/udev/parse_hwdb.py b/udev/parse_hwdb.py index 2a342bf..97f04f4 100755 --- a/udev/parse_hwdb.py +++ b/udev/parse_hwdb.py @@ -112,7 +112,13 @@ def property_grammar(): Suppress('=') - tpkbcombo_tags('VALUE')] - grammar = Or(model_props + size_props + reliability + tpkbcombo) + pressure_range = INTEGER('X') + Suppress(':') + INTEGER('Y') + pressure_prop = [ Literal('LIBINPUT_ATTR_PRESSURE_RANGE')('NAME') - + Suppress('=') - + Group(pressure_range('SETTINGS*')) ] + + grammar = Or(model_props + size_props + reliability + tpkbcombo + + pressure_prop) return grammar |