Merge pull request #23329 from superm1/mlimonci/lg850-gl

Set auto-suspend delay on LG850-GL
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-05-10 13:52:36 +02:00 committed by GitHub
commit 07b420a3b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 1 deletions

View file

@ -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
@ -71,13 +75,18 @@ usb:v0627p0001:*QEMU USB Tablet*
ID_AUTOSUSPEND=1
#########################################
# Sierra Wireless
# WWAN
#########################################
# Sierra Wireless EM7345 4G LTE modem
usb:v1199pA001*
ID_AUTOSUSPEND=1
# Fibocom LG850-GL
usb:v2CB7p0007*
ID_AUTOSUSPEND=1
ID_AUTOSUSPEND_DELAY_MS=7000
#########################################
# Wacom
#########################################

View file

@ -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')))),

View file

@ -15,4 +15,8 @@ ENV{ID_AUTOSUSPEND}=="1", TEST=="power/control", \
ENV{ID_PERSIST}=="0", TEST=="power/persist", \
ATTR{power/persist}="0"
# Set up an autosuspend delay if hwdb say so
ENV{ID_AUTOSUSPEND_DELAY_MS}!="", TEST=="power/control", \
ATTR{power/autosuspend_delay_ms}="$env{ID_AUTOSUSPEND_DELAY_MS}"
LABEL="autosuspend_end"