This reverts commit bc4a027f9c.
The match key names the chip, not the machine. `of:N<name>T<type>C<compatible>`
describes the sensor node, and the Pine64 PineNote carries the same silan
sc7a20 mounted in a different orientation, so it presents an identical
modalias:
$ cat /sys/bus/iio/devices/iio:device2/../modalias
of:NaccelerometerT(null)Csilan,sc7a20
On a device-tree machine there is no `/sys/class/dmi/id/modalias` to narrow it
with, so 60-sensor.rules looks up `sensor:modalias:of:...:` with the DMI half
empty and both boards land on the one entry. A second, PineNote-scoped entry
cannot be written: it would carry the same match string and simply shadow the
first.
The entry also overrides a correct value. The PineNote's device tree supplies
the matrix and the kernel publishes it:
$ cat /sys/bus/iio/devices/iio:device2/mount_matrix
-1, 0, 0; 0, 1, 0; 0, 0, 1
but udev then replaces it with the PineTab2's, and the four orientations
collapse into two, both landscape -- iio-sensor-proxy only ever reports
`normal` and `bottom-up`, so the display never selects portrait.
Where the kernel supplies a mount matrix, hwdb has nothing to add here; where
it does not, a local hwdb entry remains available. Tested on a PineNote v1.2,
kernel 6.12.11, systemd 257.
Closes #43321
Files in this directory specify a description of hardware devices, in the form of mappings from modalias-like keys (which identify specific hardware devices) to udev properties. Files in this directory are not read by udev directly. Instead, man:systemd-hwdb(8) compiles them into a binary database. See man:hwdb(7) for an overview of the configuration file format, and man:systemd-udevd.service(8) for a description of the udev daemon. Use 'systemd-analyze cat-config udev/hwdb.d' to display the effective config.