Commit Graph

7 Commits

Author SHA1 Message Date
Björn Daase e056f9d2a3 hwdb: Force no "mouse" type on Logitech MX Keys
Fixes https://gitlab.freedesktop.org/upower/upower/-/issues/128
2021-01-08 10:32:40 +01:00
Zbigniew Jędrzejewski-Szmek 9887369972 Partially revert "hwdb: reindent commments and say that "*" should always be trailing"
This partially reverts commit 62ad1c6495.

I kept the reindents and other cosmetic changes, but removed the statements
about trailing ":*".
2020-11-03 15:02:52 +01:00
Zbigniew Jędrzejewski-Szmek 3a7771c9c4 Partially revert "hwdb: add trailing ":*" everywhere"
This reverts commit c0443b97b7.

I got various cases wrong:
"usb:v04F3p2B7Cd5912dc00dsc00dp00ic03isc00ip00in00"
"usb:v0627p0001:QEMU USB Tablet"
"input:b0003v0627p0001e0001-e0,1,2,4,k110,111,112,r0,1,8,B,am4,lsfw"

OTOH:
-evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnASUSTeKComputerInc.:pnN53SV:*
+evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnASUSTeKComputerInc.:pnN53SV*
is OK. Other parts follow after 'pn'.

-mouse:*:name:*Trackball*:*
-mouse:*:name:*trackball*:*
-mouse:*:name:*TrackBall*:*
+mouse:*:name:*Trackball*:
+mouse:*:name:*trackball*:
+mouse:*:name:*TrackBall*:
... and anything else with :name should be OK too, because our imports always
include ":" at the end:
IMPORT{builtin}="hwdb 'joystick:$env{ID_BUS}:v$attr{id/vendor}p$attr{id/product}:name:$attr{name}:'"
Including '*' at the end makes the pattern work even if we decide to add
something to the match string later.

Fixes #17499.
2020-11-03 14:17:53 +01:00
Zbigniew Jędrzejewski-Szmek c0443b97b7 hwdb: add trailing ":*" everywhere
No functional change is intended.
The general pattern of changes:

-usb:v04F3p2B7C*
+usb:v04F3p2B7C:*
This is mostly a clarification, to make the part that makes the usb vXXXXpYYYY
part visually separated. It would only make a difference if we added further
keys with a different number of digits, which is unlikely.

-usb:v0627p0001:*QEMU USB Keyboard*
-usb:v0627p0001:*QEMU USB Mouse*
-usb:v0627p0001:*QEMU USB Tablet*
+usb:v0627p0001:*QEMU USB Keyboard*:*
+usb:v0627p0001:*QEMU USB Mouse*:*
+usb:v0627p0001:*QEMU USB Tablet*:*
Again, only a clarification. We know that ":" will appear somewhere later in
the match key, so anything that matches "…Keyboard*" will also match "…Keyboard*:*".

-evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnASUSTeKComputerInc.:pnN53SV*
+evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnASUSTeKComputerInc.:pnN53SV:*
This makes the match narrower. Previously we would match product "N53SV"
and "N53SV2", "N53SV3", and others. Here we are saying that the ':pn' part must
match exactly. Most of the changes in this patch match this pattern. I made a few
judgement calls and used "pn…*:*" when I wasn't sure if the full pn is included:
-evdev:name:Dell WMI hotkeys:dmi:bvn*:bvr*:bd*:svnDell*:pnPrecision*
+evdev:name:Dell WMI hotkeys:dmi:bvn*:bvr*:bd*:svnDell*:pnPrecision*:*

-evdev:name:Cypress APA Trackpad ?cyapa?:dmi:*:svnHewlett-Packard*:pnFalco*:
+evdev:name:Cypress APA Trackpad ?cyapa?:dmi:*:svnHewlett-Packard*:pnFalco*:*
This more like the "QEMU" example above, since all dmi strings end in ":", so
anything which matches the old version will also match the new version.

-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnGateway*:pnA0A1*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnGateway*:pnA0A1*:*

I replaced trailing ":pvr*" by ":*". This makes no functional difference because
we expect "pvr" to always appear in the dmi string. This makes patterns shorter.

-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn*:*

OTOH, ":pn*" is kept. This is because almost patterns include ":pn*", and if we
skip it, we should make it clear that this is on purpose, that we really want to
match any product name.

The python script to generate autosuspend rules is updated to use ":*" too.

Inspired by https://github.com/systemd/systemd/pull/17281#discussion_r501489750.
2020-10-15 18:01:32 +02:00
Zbigniew Jędrzejewski-Szmek 62ad1c6495 hwdb: reindent commments and say that "*" should always be trailing 2020-10-15 13:35:58 +02:00
Bastien Nocera 259f0dfbec hwdb: Force "mouse" type on Logitech Ultrathin Touch Mouse
Closes: #15657
2020-05-06 21:09:29 +02:00
Zbigniew Jędrzejewski-Szmek 4f10b80786 Rename udev's hwdb/ to hwdb.d/
As in the parent commit, this makes the name consistent with the
rest of the source tree and the actuall installation path.
2019-10-10 00:53:09 +01:00
Renamed from hwdb/60-input-id.hwdb (Browse further)