diff options
author | Mario Limonciello <mario.limonciello@dell.com> | 2019-09-09 22:49:35 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-10-04 08:57:29 +0200 |
commit | b61d777abeecd8b6c76035e11899aae210633534 (patch) | |
tree | fceadec42baa379b4c6c92789361d713aa2e4584 /rules/meson.build | |
parent | 3a77f9fb4c2ff8d26ef772c7426fcbc37ad4d023 (diff) | |
download | systemd-b61d777abeecd8b6c76035e11899aae210633534.tar.gz |
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>
Diffstat (limited to 'rules/meson.build')
-rw-r--r-- | rules/meson.build | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rules/meson.build b/rules/meson.build index 79423cc2c4..57896aa1a4 100644 --- a/rules/meson.build +++ b/rules/meson.build @@ -14,6 +14,7 @@ rules = files(''' 60-persistent-v4l.rules 60-sensor.rules 60-serial.rules + 61-autosuspend-manual.rules 70-joystick.rules 70-mouse.rules 70-touchpad.rules @@ -44,3 +45,11 @@ foreach file : rules_in install_dir : udevrulesdir) all_rules += gen endforeach + +auto_suspend_rules = custom_target( + '60-autosuspend-chromeos.rules', + output : '60-autosuspend-chromeos.rules', + command : make_autosuspend_rules_py, + capture : true, + install : true, + install_dir: [udevrulesdir]) |