From: Wesley Cheng <wcheng@codeaurora.org>
To: Linux USB List <linux-usb@vger.kernel.org>
Subject: dwc3: Power management for cable disconnect
Date: Fri, 16 Oct 2020 00:29:19 -0700 [thread overview]
Message-ID: <0fe1cf51-c9d4-9780-e542-a613bba58928@codeaurora.org> (raw)
Hi linux-usb members!
I was looking at seeing how the DWC3 drivers are handling the USB cable
disconnect routine (VBUS low situation) when there is no UDC binded. Is
the below behavior expected?
1. Enumerate device w/ host.
2. Gadget is unbinded
- echo "" > /sys/kernel/config/usb_gadget/g1/UDC
3. Disconnect the USB cable (VBUS low)
4. No dwc3_gadget_disconnect_interrupt() seen (since controller is
halted from step#1)
5. Runtime PM autosuspend fails due to "dwc->connected" being true
(cleared in dwc3_gadget_disconnect_interrupt())
6. Gadget binded
- echo udc_name > /sys/kernel/config/usb_gadget/g1/UDC
7. No runtime suspend until cable is plugged in and out
This would be problematic for devices which have to reliably enter
suspend. I just wanted to see if this is a scenario which has been
considered? Seems odd that we would still keep the controller out of
low power if there was no cable connected.
Thanks
Regards,
Wesley Cheng
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
next reply other threads:[~2020-10-16 7:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-16 7:29 Wesley Cheng [this message]
2020-10-16 22:42 ` dwc3: Power management for cable disconnect Thinh Nguyen
2020-10-20 5:46 ` Wesley Cheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0fe1cf51-c9d4-9780-e542-a613bba58928@codeaurora.org \
--to=wcheng@codeaurora.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).