summaryrefslogtreecommitdiffstats
path: root/hwdb.d
diff options
context:
space:
mode:
authorMario Limonciello <superm1@gmail.com>2022-05-10 03:16:22 +0200
committerMario Limonciello <superm1@gmail.com>2022-05-10 04:14:12 +0200
commitfa9a43a6905187195c9e86a61a906647726c3e55 (patch)
tree2a7f4c1fb20b27ac40a9478a4a724ef7bb7db68e /hwdb.d
parentMerge pull request #23321 from poettering/sockaddr-no-cast (diff)
downloadsystemd-fa9a43a6905187195c9e86a61a906647726c3e55.tar.xz
systemd-fa9a43a6905187195c9e86a61a906647726c3e55.zip
Add support to set autosuspend delay via hwdb
Diffstat (limited to 'hwdb.d')
-rw-r--r--hwdb.d/60-autosuspend.hwdb4
-rwxr-xr-xhwdb.d/parse_hwdb.py1
2 files changed, 5 insertions, 0 deletions
diff --git a/hwdb.d/60-autosuspend.hwdb b/hwdb.d/60-autosuspend.hwdb
index 1b6c1e1c8f..323611d000 100644
--- a/hwdb.d/60-autosuspend.hwdb
+++ b/hwdb.d/60-autosuspend.hwdb
@@ -24,8 +24,12 @@
#
# Allowed properties are:
# ID_AUTOSUSPEND=1
+# ID_AUTOSUSPEND_DELAY_MS=####
# ID_PERSIST=0
#
+# ID_AUTOSUSPEND_DELAY_MS adjusts the delay for autosuspend to something
+# different than the kernel default of 2000ms.
+#
# ID_PERSIST=0 allows disabling the kernels USB "persist" feature, which allows
# the continued use of devices after a power loss (due to suspend). Disable it
# if the device will loose state without a USB power session and the driver
diff --git a/hwdb.d/parse_hwdb.py b/hwdb.d/parse_hwdb.py
index 93179b675c..7bad559699 100755
--- a/hwdb.d/parse_hwdb.py
+++ b/hwdb.d/parse_hwdb.py
@@ -135,6 +135,7 @@ def property_grammar():
('MOUSE_WHEEL_CLICK_COUNT', INTEGER),
('MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL', INTEGER),
('ID_AUTOSUSPEND', Or((Literal('0'), Literal('1')))),
+ ('ID_AUTOSUSPEND_DELAY_MS', INTEGER),
('ID_AV_PRODUCTION_CONTROLLER', Or((Literal('0'), Literal('1')))),
('ID_PERSIST', Or((Literal('0'), Literal('1')))),
('ID_PDA', Or((Literal('0'), Literal('1')))),