summaryrefslogtreecommitdiff
path: root/rules.d/61-autosuspend-manual.rules
diff options
context:
space:
mode:
Diffstat (limited to 'rules.d/61-autosuspend-manual.rules')
-rw-r--r--rules.d/61-autosuspend-manual.rules19
1 files changed, 19 insertions, 0 deletions
diff --git a/rules.d/61-autosuspend-manual.rules b/rules.d/61-autosuspend-manual.rules
new file mode 100644
index 0000000000..2b973af960
--- /dev/null
+++ b/rules.d/61-autosuspend-manual.rules
@@ -0,0 +1,19 @@
+# This udev rule is for any devices that should enter automatic suspend
+# but are not already included in generated rules from Chromium OS via
+# tools/make-autosuspend-rules.py
+#
+
+ACTION!="add", GOTO="autosuspend_manual_end"
+SUBSYSTEM!="usb", GOTO="autosuspend_manual_end"
+
+SUBSYSTEM=="usb", GOTO="autosuspend_manual_usb"
+
+# USB rules
+LABEL="autosuspend_manual_usb"
+GOTO="autosuspend_manual_end"
+
+# Enable autosuspend
+LABEL="autosuspend_manual_enable"
+TEST=="power/control", ATTR{power/control}="auto", GOTO="autosuspend_manual_end"
+
+LABEL="autosuspend_manual_end"