main/postmarketos-base: udev tm2-touchkey and rt5033-battery
This merge request combines the MRs !2300 (closed) and !2303 (closed).
The udev file 20-tm2-touchkey-leds.rules
disables the leds of tm2-touchkey by default because they are in an unconfigured state.
The udev file 95-rt5033-battery-refresh.rules
triggers a refresh of the rt5033-battery information within UPower 5 secs after initialization. This avoids a wrong battery icon after boot.
Affected devices are:
- samsung-a3lte
- samsung-a3ulte
- samsung-a5lte
- samsung-a5ulte
- samsung-serranovelte
- samsung-klte (tm2-touchkey only, though currently implemeted differently in device tree)
I think we already kind of agreed that these two udev files can be installed centrally.
In the first approach, I put the udev files to /etc/udev/rules.d. Reconsidering this, preinstalled udev files should go into /lib/udev/rules.d. Therefore I also moved the already existing file 50-firmware.rules
.
Still open is the way of implementation. Currently, there are three proposals:
-
Package
postmarketos-base
: That's where they would go in the current situation. -
New package
postmarketos-quirks
, linked to packagepostmarketos-base
: This package would allow a more flexible apporach for future cross-device solutions that are too small for a stand-alone package, thematically do not fit well intopostmarketos-base
and need to be installed on either all devices (main packagepostmarketos-quirks
) or several specific devices (subpackages ofpostmarketos-quirks
). -
New package
postmarketos-udev-rules
, linked to packagepostmarketos-base
: This would be more clear thanpostmarketos-quirks
but less flexible. Outsourcing udev files to a separate package would prevent to raise the version ofpostmarketos-base
every time an udev files goes in or out.