mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
udev: hwdb: Match iio sensors based on their label
The IIO subsystem exposes a 'label' sysfs file to help userspace better identify its devices [1]. Standardized labels include the sensor type along with its location, including 'accel-base' and 'accel-display'. Most Chrome OS boards have two accelerometers that are indistinguishable except for this label (or a 'location' sysfs file before Linux v6.0), and need different mounting matrix corrections based on their location. Add a udev rule that matches hwdb entries using this label, so we can correct both accelerometers on these devices with hwdb entries. The existing rules and hwdb entries are not modified to keep potential out-of-tree entries working, but new entries in this form will override existing ones. Also add currently standardized labels to parse-hwdb.py. [1] https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-iio
This commit is contained in:
@@ -72,7 +72,20 @@ TYPES = {'mouse': ('usb', 'bluetooth', 'ps2', '*'),
|
||||
'touchpad': ('i8042', 'rmi', 'bluetooth', 'usb'),
|
||||
'joystick': ('i8042', 'rmi', 'bluetooth', 'usb'),
|
||||
'keyboard': ('name', ),
|
||||
'sensor': ('modalias', ),
|
||||
'sensor': ('modalias',
|
||||
'accel-base',
|
||||
'accel-display',
|
||||
'accel-camera',
|
||||
'proximity-palmrest',
|
||||
'proximity-palmrest-left',
|
||||
'proximity-palmrest-right',
|
||||
'proximity-lap',
|
||||
'proximity-wifi',
|
||||
'proximity-lte',
|
||||
'proximity-wifi-lte',
|
||||
'proximity-wifi-left',
|
||||
'proximity-wifi-right',
|
||||
),
|
||||
'ieee1394-unit-function' : ('node', ),
|
||||
'camera': ('usb'),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user