Skip to content

Introduce udev rules and hwdb to track wakeup keys

Guido Günther requested to merge guidog/gmobile:hwdb into main

On phones and tablets the only key that should usually unidle a device is the power button while other exposed hardware keys like the volume buttons shouldn't e.g. take the device out of idle / unblank the screen.

Allow to specify whether an input device has wakeup keys (default is

  1. and to specify whether individual keys on that device are wakeup keys or not. E.g.
gmobile:…
 GM_WAKEUP_KEY_DEFAULT=0
 GM_WAKEUP_KEY_116=1

would mark all keys on the matching input device as non-wakeup keys with the exception of the power button. This would be a typical setting for phones. Whereas on a convertible that has a single keyboard device containing both the exposed volume keys as well as the regular input keys

gmobile:…
 GM_WAKEUP_KEY_114=0
 GM_WAKEUP_KEY_115=0

would allow all keys to unidle the device except for the exposed volume rocker.

See https://github.com/systemd/systemd/pull/32261 for details

Device tree devices can't match via dmi modalias. The corresponding thing there is the DT compatible. Allow to match by the most specific part of the device tree compatible. This allows to e.g. match the volume keys on a Librem 5 like:

  gmobile:name:gpio-keys:dt:purism,librem5*

matching on a specific model would look like

  gmobile:name:gpio-keys:dt:purism,librem5r4

See https://github.com/systemd/systemd/pull/32362 for details. I opted for a 'gmobile:' instead of e.g. wakeup: prefix as we likely get more properties and can hence use the same matching rules. As the "API" is considered private we can also change the prefix at any time.

The rest of this series are ci and packaging improvements.

I'll mark this as draft for the moment as I can't test the pipelines due to no runners picking it up atm.

Edited by Guido Günther

Merge request reports

Loading