From f0b75cda5a3eac3fe953fd1a429a39e077387997 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 1 Nov 2022 13:10:20 +0900 Subject: [PATCH 1/2] parse_hwdb: allow negative value for EVDEV_ABS_ properties --- hwdb.d/parse_hwdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hwdb.d/parse_hwdb.py b/hwdb.d/parse_hwdb.py index c0dde75650..5a1ae5a6a0 100755 --- a/hwdb.d/parse_hwdb.py +++ b/hwdb.d/parse_hwdb.py @@ -202,7 +202,7 @@ def property_grammar(): ] abs_props = [Regex(r'EVDEV_ABS_[0-9a-f]{2}')('NAME') - Suppress('=') - - Word(nums + ':')('VALUE') + Word('-' + nums + ':')('VALUE') ] grammar = Or(fixed_props + kbd_props + abs_props) + EOL From f1c73e5b825ad55dbfe7fcd30f60a20975c26846 Mon Sep 17 00:00:00 2001 From: p-fpv <103542588+p-fpv@users.noreply.github.com> Date: Mon, 31 Oct 2022 23:45:53 +0300 Subject: [PATCH 2/2] hwdb: Add Lenovo G580 Fixes #23066. --- hwdb.d/60-evdev.hwdb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hwdb.d/60-evdev.hwdb b/hwdb.d/60-evdev.hwdb index b91fd8f294..42e30256e3 100644 --- a/hwdb.d/60-evdev.hwdb +++ b/hwdb.d/60-evdev.hwdb @@ -622,6 +622,13 @@ evdev:name:MSFT0001:02 04F3:304B Touchpad:dmi:*svnLENOVO:*pvrLenovoLegionY9000X2 EVDEV_ABS_35=::31 EVDEV_ABS_36=::30 +# Lenovo g580 +evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnLENOVO:*pvrLenovoG580** + EVDEV_ABS_00=-170:2950:24 + EVDEV_ABS_01=-591:700:25 + EVDEV_ABS_35=-170:2950:24 + EVDEV_ABS_36=-591:700:25 + ######################################### # Microsoft #########################################