diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2020-09-27 07:31:59 +0800 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2020-09-29 07:45:17 +0800 |
commit | f0c26e0b7352fb12e2981b78fd229195771ac18f (patch) | |
tree | 920415d67cbbb8f121d3850b978d466512c69488 | |
parent | c31aa99287b89d6b03c37b9e3661bde414a6ef49 (diff) |
usb: usblp: enable usb autosuspend by defaultlinaro-m5-2020_09_30
Qualcomm usb bus has a quirk that usb device needs to be in suspend
state when system resumes, and should later be resumed by remote wakeup
or interface activity. This requires autosuspend to be enabled for usb
device like printer here. To get system suspend/resume work on Square
device, user space has to enable printer autosuspend like below.
$ echo auto > /sys/bus/usb/devices/1-1.3/power/control
To make it easier for user space, let's just enable autosuspend by
default for the printer, so that user space doesn't have to flip the
'control' every time the printer gets enumerated.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
-rw-r--r-- | drivers/usb/class/usblp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index 4a80103675d5..b6ffa854af68 100644 --- a/drivers/usb/class/usblp.c +++ b/drivers/usb/class/usblp.c @@ -1188,6 +1188,9 @@ static int usblp_probe(struct usb_interface *intf, le16_to_cpu(usblp->dev->descriptor.idVendor), le16_to_cpu(usblp->dev->descriptor.idProduct)); + /* Square kernel customization */ + usb_enable_autosuspend(dev); + return 0; abort_intfdata: |