From: Roger Quadros <rogerq@kernel.org>
To: Elson Roy Serrao <quic_eserrao@quicinc.com>,
Thinh.Nguyen@synopsys.com, stern@rowland.harvard.edu
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org, quic_wcheng@quicinc.com,
quic_jackp@quicinc.com
Subject: Re: [PATCH v3 0/3] Support dwc3 runtime suspend during bus suspend
Date: Wed, 12 Jul 2023 15:16:05 +0300 [thread overview]
Message-ID: <5ccff4a9-1073-ea82-8360-445a956e9266@kernel.org> (raw)
In-Reply-To: <20230711174320.24058-1-quic_eserrao@quicinc.com>
Hi Elson,
On 11/07/2023 20:43, Elson Roy Serrao wrote:
> Changes in v3
> - Added a dt property 'snps,allow-rtsusp-on-u3' to make this feature platform
> dependent as per the feedback from Thinh N.
> - Changed the RT idle/suspend/resume handling to device mode specific and dt
> property dependent.
> - Modified the cover letter to document how resume is handled on qcom platforms.
>
> Changes in v2
> - Used pm_runtime_resume_and_get() API instead of pm_runtime_get_sync()
> as suggested by Dan.
> - Handled the return value in ether_wakeup_host to print error message.
>
> When a USB link is idle, the host sends a bus suspend event to the device
> so that the device can save power. But true power savings during bus
> suspend can be seen only if we let the USB controller enter low power
> mode and turn off the clocks. Vendor drivers may have their own runtime
> power management framework to power up/down the controller. But since
> vendor drivers' runtime suspend/resume routines depend on the dwc3 child
> node we would need a framework to trigger dwc3 runtime pm ops whenever a
> bus suspend is received. If the device wants to exit from bus suspend
> state it can send a wakeup signal to the host by first bringing out the
> controller from low power mode. This series implements the needed
> framework to achieve this functionality when a bus suspend interupt is
> received. The assumption here is that the dwc3 hibernation feature is not
> enabled and the platform is responsible in detecting the resume events to
> bring the controller out of suspend.
>
> On Qualcomm platforms the bus resume is handled through Phy and informed to
> software through wakeup capable phy interrupts.
> usb2 PHY is configured to detect the Resume K event and sends an interrupt
> when this event is detected. This would trigger the runtime resume of the
> glue driver which would intrinsically wakeup the dwc3 child. In case of usb3 PHY,
> it is configured to detect the LFPS wake signal during bus resume and the
> corresponding interrupt triggers the runtime resume of the glue driver.
Subject says runtime suspend. But are you testing system sleep/wakeup as well
while USB is suspended?
>
> The series is organized in below fashion:
> Patch 1: This includes the modification needed from function drivers to let
> UDC enter low power mode with u_ether as an example.
> Patch 2: New dt property to allow dwc3 runtime suspedn during bus suspend scenario.
> Patch 3: This has the modification needed in the UDC driver to trigger runtime
> suspend whene a bus suspend interrupt is received. Since this is a platform
> dependent change it is made applicable through a dt property. This also handles
> resume and remote wakeup modifications from power management perspective.
>
> Elson Roy Serrao (3):
> usb: function: u_ether: Handle rx requests during suspend/resume
> dt-bindings: usb: snps,dwc3: Add allow-rtsusp-on-u3 property
> usb: dwc3: Modify runtime pm ops to handle bus suspend
>
> .../devicetree/bindings/usb/snps,dwc3.yaml | 5 ++
> drivers/usb/dwc3/core.c | 26 ++++++++--
> drivers/usb/dwc3/core.h | 3 ++
> drivers/usb/dwc3/gadget.c | 40 +++++++++++++---
> drivers/usb/gadget/function/u_ether.c | 47 +++++++++++++++----
> 5 files changed, 102 insertions(+), 19 deletions(-)
>
--
cheers,
-roger
prev parent reply other threads:[~2023-07-12 12:16 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-11 17:43 [PATCH v3 0/3] Support dwc3 runtime suspend during bus suspend Elson Roy Serrao
2023-07-11 17:43 ` [PATCH v3 1/3] usb: function: u_ether: Handle rx requests during suspend/resume Elson Roy Serrao
2023-07-11 17:43 ` [PATCH v3 2/3] dt-bindings: usb: snps,dwc3: Add allow-rtsusp-on-u3 property Elson Roy Serrao
2023-07-11 21:56 ` Thinh Nguyen
2023-07-11 22:38 ` Elson Serrao
2023-07-12 11:53 ` Roger Quadros
2023-07-12 22:34 ` Thinh Nguyen
2023-07-12 5:47 ` Krzysztof Kozlowski
2023-07-11 17:43 ` [PATCH v3 3/3] usb: dwc3: Modify runtime pm ops to handle bus suspend Elson Roy Serrao
2023-07-11 22:07 ` Thinh Nguyen
2023-07-11 22:51 ` Elson Serrao
2023-07-11 23:22 ` Elson Serrao
2023-07-12 13:46 ` Roger Quadros
2023-07-12 22:57 ` Elson Serrao
2023-07-13 12:56 ` Roger Quadros
2023-07-13 22:31 ` Elson Serrao
2023-07-14 12:23 ` Roger Quadros
2023-07-14 20:34 ` Elson Serrao
2023-07-11 21:58 ` [PATCH v3 0/3] Support dwc3 runtime suspend during " Thinh Nguyen
2023-07-12 12:16 ` Roger Quadros [this message]
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=5ccff4a9-1073-ea82-8360-445a956e9266@kernel.org \
--to=rogerq@kernel.org \
--cc=Thinh.Nguyen@synopsys.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=quic_eserrao@quicinc.com \
--cc=quic_jackp@quicinc.com \
--cc=quic_wcheng@quicinc.com \
--cc=stern@rowland.harvard.edu \
/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