summaryrefslogtreecommitdiffstats
path: root/hwdb.d/parse_hwdb.py
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2021-09-15 18:37:24 +0200
committerBenjamin Berg <bberg@redhat.com>2021-09-21 20:28:10 +0200
commitbd37360a210603cb2c27feb7602008c71ca2ab67 (patch)
tree49dc751f33417e5e3dcc6e41739563f0048a0ef4 /hwdb.d/parse_hwdb.py
parentmkosi: Fix CI (diff)
downloadsystemd-bd37360a210603cb2c27feb7602008c71ca2ab67.tar.xz
systemd-bd37360a210603cb2c27feb7602008c71ca2ab67.zip
hwdb: Permit unsetting power/persist for USB devices
The USB persist feature allows devices that can retain their state when powered down to work across suspend/resume. This is in particular useful for USB drives. However, the persist feature can get in the way for devices that are unable to retain their state when power is lost. An example of such stateful devices are fingerprint readers where USB persist should be disabled to ensure userspace can detect whether the USB device had a power loss during system suspend. This will initially be used by the libfprint autosuspend hwdb. Closes: #20754
Diffstat (limited to 'hwdb.d/parse_hwdb.py')
-rwxr-xr-xhwdb.d/parse_hwdb.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/hwdb.d/parse_hwdb.py b/hwdb.d/parse_hwdb.py
index dea71acfe9..f385e52628 100755
--- a/hwdb.d/parse_hwdb.py
+++ b/hwdb.d/parse_hwdb.py
@@ -134,6 +134,7 @@ def property_grammar():
('MOUSE_WHEEL_CLICK_COUNT', INTEGER),
('MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL', INTEGER),
('ID_AUTOSUSPEND', Or((Literal('0'), Literal('1')))),
+ ('ID_PERSIST', Or((Literal('0'), Literal('1')))),
('ID_INPUT', Or((Literal('0'), Literal('1')))),
('ID_INPUT_ACCELEROMETER', Or((Literal('0'), Literal('1')))),
('ID_INPUT_JOYSTICK', Or((Literal('0'), Literal('1')))),