mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] Allow dwc3 runtime suspend during bus suspend event
@ 2023-05-11 17:48 Elson Roy Serrao
  2023-05-11 17:48 ` [PATCH 1/2] usb: function: u_ether: Handle rx requests during suspend/resume Elson Roy Serrao
  2023-05-11 17:48 ` [PATCH 2/2] usb: dwc3: Modify runtime pm ops to handle bus suspend Elson Roy Serrao
  0 siblings, 2 replies; 6+ messages in thread
From: Elson Roy Serrao @ 2023-05-11 17:48 UTC (permalink / raw)
  To: gregkh, Thinh.Nguyen
  Cc: linux-kernel, linux-usb, quic_wcheng, quic_jackp, Elson Roy Serrao

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 series is organized in below fashion:
Patch 1: This includes the modification needed from function drivers to let
UDC enter low power mode. 
Patch 2: This has the modification needed in the UDC driver to trigger runtime
suspend whene a bus suspend interrupt is received. This also handles resume
and remote wakeup features from power management perspective.

Elson Roy Serrao (2):
  usb: function: u_ether: Handle rx requests during suspend/resume
  usb: dwc3: Modify runtime pm ops to handle bus suspend

 drivers/usb/dwc3/core.c               | 19 ++++++++++++++
 drivers/usb/dwc3/gadget.c             | 40 +++++++++++++++++++++++------
 drivers/usb/gadget/function/u_ether.c | 47 +++++++++++++++++++++++++++--------
 3 files changed, 89 insertions(+), 17 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-05-12 17:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-11 17:48 [PATCH 0/2] Allow dwc3 runtime suspend during bus suspend event Elson Roy Serrao
2023-05-11 17:48 ` [PATCH 1/2] usb: function: u_ether: Handle rx requests during suspend/resume Elson Roy Serrao
2023-05-11 19:33   ` kernel test robot
2023-05-11 17:48 ` [PATCH 2/2] usb: dwc3: Modify runtime pm ops to handle bus suspend Elson Roy Serrao
2023-05-12  4:18   ` Dan Carpenter
2023-05-12 17:18     ` Elson Serrao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®