eudev/rules
Boian Bonev fa741e87a8
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

systemd-commit e2f25ae64889ea7fe8a7556ee5fba91bc2a0eab8
Author: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Date:   Thu Aug 18 17:27:22 2022 +0300
2022-09-22 01:17:17 +03:00
..
50-udev-default.rules Merge suitable rules changes from systemd 2022-05-26 19:31:43 +03:00
60-autosuspend.rules Merge suitable rules changes from systemd 2022-05-26 19:31:43 +03:00
60-block.rules Merge suitable rules changes from systemd 2022-05-26 19:31:43 +03:00
60-cdrom_id.rules rules: update 2017-09-03 13:20:33 -04:00
60-drm.rules rules: update 2017-09-03 13:20:33 -04:00
60-evdev.rules Merge suitable rules changes from systemd 2022-05-26 19:31:43 +03:00
60-fido-id.rules Merge suitable rules changes from systemd 2022-05-26 19:31:43 +03:00
60-input-id.rules rules: update 2018-02-20 07:36:20 -05:00
60-persistent-alsa.rules move imported udev into place 2012-04-04 05:05:07 +02:00
60-persistent-input.rules Merge suitable rules changes from systemd 2022-05-26 19:31:43 +03:00
60-persistent-storage-tape.rules Merge suitable rules changes from systemd 2022-05-26 19:31:43 +03:00
60-persistent-storage.rules Merge suitable rules changes from systemd 2022-05-26 19:31:43 +03:00
60-persistent-v4l.rules udev: move all unconditionally installed rules to rules/ 2012-04-14 20:10:03 +02:00
60-sensor.rules udev: hwdb: Match iio sensors based on their label 2022-09-22 01:17:17 +03:00
60-serial.rules rules: merge tty and serial rules file 2015-03-18 15:55:48 -04:00
64-btrfs.rules.in Merge suitable rules changes from systemd 2022-05-26 19:31:43 +03:00
70-camera.rules Merge suitable rules changes from systemd 2022-05-26 19:31:43 +03:00
70-joystick.rules rules: update 2018-02-20 07:36:20 -05:00
70-memory.rules Merge suitable rules changes from systemd 2022-05-26 19:31:43 +03:00
70-mouse.rules hwdb: add rule and first entry for PS/2 mice 2014-12-29 11:42:46 -05:00
70-touchpad.rules rules: update 2016-11-23 20:00:48 -05:00
75-net-description.rules rules: bring up to date with upstream 2013-07-30 08:48:51 -04:00
75-probe_mtd.rules Permit users to disable module loading support 2012-11-23 01:55:28 -05:00
78-sound-card.rules Merge suitable rules changes from systemd 2022-05-26 19:31:43 +03:00
80-drivers.rules Merge suitable rules changes from systemd 2022-05-26 19:31:43 +03:00
80-net-name-slot.rules 80-net-name-slot.rules: restored for issue #117. 2015-06-02 10:10:45 -04:00
81-net-dhcp.rules Merge suitable rules changes from systemd 2022-05-26 19:31:43 +03:00
Makefile.am Merge suitable rules changes from systemd 2022-05-26 19:31:43 +03:00