rules: Add automatic suspend udev rules
authorMario Limonciello <mario.limonciello@dell.com>
Mon, 9 Sep 2019 21:49:35 +0000 (22:49 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 4 Oct 2019 06:57:29 +0000 (08:57 +0200)
commitb61d777abeecd8b6c76035e11899aae210633534
treefceadec42baa379b4c6c92789361d713aa2e4584
parent3a77f9fb4c2ff8d26ef772c7426fcbc37ad4d023
rules: Add automatic suspend udev rules

The ChromeOS ecosystem has a large amount of testing, both automated
and manual across devices including measurement of power regressions.

It's safe to assume that any of these devices will handle USB
auto-suspend appropriately.  Use the script from ChromeOS
https://chromium.googlesource.com/chromiumos/platform2/+/master/power_manager/udev/gen_autosuspend_rules.py
to generate udev rules at build time.

This script in systemd `tools/chromeos/gen_autosuspend_rules.py` should be kept
in sync with the ChromeOS version of the script.

Manually added autosuspend devices should be placed in the new
template `rules/61-autosuspend-manual.rules`

Suggested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
meson.build
rules/61-autosuspend-manual.rules [new file with mode: 0644]
rules/meson.build
tools/chromeos/gen_autosuspend_rules.py [new file with mode: 0755]
tools/make-autosuspend-rules.py [new file with mode: 0755]