From e46e4d58f4a991cf6d83e422665fe2863d64438a Mon Sep 17 00:00:00 2001 From: Jack Pham Date: Thu, 4 May 2023 11:55:47 -0700 Subject: [PATCH] sm8550-common: ueventd: Change ownership of USB device power control settings Change ownership of USB devices' power autosuspend, control and wakeup file nodes to system user and usb group. This allows the USB HAL running as non-root to dynamically enable autosuspend for enumerated devices. Change-Id: I92806107a46ea0256cef5f211e7ea910541f1705 --- init/ueventd.qcom.rc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/init/ueventd.qcom.rc b/init/ueventd.qcom.rc index c8fa380..a5980c5 100644 --- a/init/ueventd.qcom.rc +++ b/init/ueventd.qcom.rc @@ -478,6 +478,12 @@ subsystem mem_buf_vm # USB Dynamic Disable /sys/bus/platform/devices/a600000.ssusb dynamic_disable 0220 root usb +# USB autosuspend/wakeup settings +/sys/bus/usb/devices/* power/autosuspend 0660 system usb +/sys/bus/usb/devices/* power/autosuspend_delay_ms 0660 system usb +/sys/bus/usb/devices/* power/control 0660 system usb +/sys/bus/usb/devices/* power/wakeup 0660 system usb + #Memory Offline /sys/devices/system/memory/memory* state 0660 system system