[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1685141140-26228-1-git-send-email-quic_eserrao@quicinc.com>
Date: Fri, 26 May 2023 15:45:38 -0700
From: Elson Roy Serrao <quic_eserrao@...cinc.com>
To: gregkh@...uxfoundation.org, Thinh.Nguyen@...opsys.com
Cc: linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
quic_wcheng@...cinc.com, quic_jackp@...cinc.com,
Elson Roy Serrao <quic_eserrao@...cinc.com>
Subject: [PATCH v2 0/2] Support dwc3 runtime suspend during bus suspend
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 series is organized in below fashion:
Patch 1: This includes the modification needed from function driver u_ether
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, 90 insertions(+), 16 deletions(-)
--
2.7.4
Powered by blists - more mailing lists