diff options
Diffstat (limited to 'udev')
-rw-r--r-- | udev/90-libinput-model-quirks.hwdb | 9 | ||||
-rwxr-xr-x | udev/parse_hwdb.py | 8 |
2 files changed, 16 insertions, 1 deletions
diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb index 04bdf9a..a5102d2 100644 --- a/udev/90-libinput-model-quirks.hwdb +++ b/udev/90-libinput-model-quirks.hwdb @@ -187,3 +187,12 @@ libinput:touchpad:input:b0003v056Ap* ########################################## libinput:name:*Trackball*:dmi:* LIBINPUT_MODEL_TRACKBALL=1 + +########################################## +# Chassis types 9 (Laptop) and 10 +# (Notebook) are expected to have working +# lid switches +########################################## +libinput:name:*Lid Switch*:dmi:*:ct10:* +libinput:name:*Lid Switch*:dmi:*:ct9:* + LIBINPUT_ATTR_LID_SWITCH_RELIABILITY=reliable diff --git a/udev/parse_hwdb.py b/udev/parse_hwdb.py index d90c90f..102ef6c 100755 --- a/udev/parse_hwdb.py +++ b/udev/parse_hwdb.py @@ -98,10 +98,16 @@ def property_grammar(): ('LIBINPUT_ATTR_SIZE_HINT', Group(dimension('SETTINGS*'))), ('LIBINPUT_ATTR_RESOLUTION_HINT', Group(dimension('SETTINGS*'))), ) + size_props = [Literal(name)('NAME') - Suppress('=') - val('VALUE') for name, val in sz_props] - grammar = Or(model_props + size_props); + reliability_tags = (Literal("reliable")) + reliability = [Literal('LIBINPUT_ATTR_LID_SWITCH_RELIABILITY')('NAME') - + Suppress('=') - + Group(OneOrMore(reliability_tags))('VALUE')] + + grammar = Or(model_props + size_props + reliability) return grammar |