summaryrefslogtreecommitdiffstats
path: root/rules.d/60-sensor.rules (follow)
Commit message (Collapse)AuthorAgeFilesLines
* udev: hwdb: Add rules to match cros-ec-accel by 'location' sysfs fileAlper Nebi Yasak2022-08-181-0/+11
| | | | | | | | | | | | | The cros-ec-accel devices report their mounting location by the 'label' sysfs file only since Linux v6.0. With earlier kernels, a nonstandard 'location' file reports this, but slightly differently (lid instead of display) [1]. Add udev rules to import the correct hwdb entries based on this 'location' file for cros-ec-accel devices, so that the base-mounted accel matrix has the correct value for older kernels as well. [1] https://kernel.org/doc/Documentation/ABI/testing/sysfs-bus-iio-cros-ec
* udev: hwdb: Match iio sensors based on their labelAlper Nebi Yasak2022-08-181-0/+5
| | | | | | | | | | | | | | | | | | 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
* Rename udev's rules/ to rules.d/Zbigniew Jędrzejewski-Szmek2019-10-101-0/+18
This change is only about the source tree. We have tmpfiles.d/, modprobe.d/, sysctl.d/, and sysusers.d/, but for historical reasons, rules/ didn't fit this pattern. We also *install* it as rules.d/. Let's rename to be consistent.