mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-04-05 11:20:42 +02:00
udev: mark all laptops as lid switch reliable
If the chassis type is 9 or 10 (Laptop, Notebook) let's assume that our lid switch works. On anything else we leave it at unknown. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
4eb29a8cc5
commit
2a8d64c02d
2 changed files with 16 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue