lkml.org 
[lkml]   [2021]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v7 2/5] usb: dwc3: core: Host wake up support from system suspend
From
Date

On 4/28/2021 3:29 PM, Felipe Balbi wrote:
> Hi,
>
> Sandeep Maheswaram <sanm@codeaurora.org> writes:
>> Avoiding phy powerdown when wakeup capable devices are connected
>> by checking phy_power_off flag.
>> Phy should be on to wake up the device from suspend using wakeup capable
>> devices such as keyboard and mouse.
>>
>> Signed-off-by: Sandeep Maheswaram <sanm@codeaurora.org>
>> Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
>> ---
>> drivers/usb/dwc3/core.c | 7 +++++--
>> 1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
>> index b6e53d8..bb414c3 100644
>> --- a/drivers/usb/dwc3/core.c
>> +++ b/drivers/usb/dwc3/core.c
>> @@ -1738,7 +1738,7 @@ static int dwc3_suspend_common(struct dwc3 *dwc, pm_message_t msg)
>> dwc3_core_exit(dwc);
>> break;
>> case DWC3_GCTL_PRTCAP_HOST:
>> - if (!PMSG_IS_AUTO(msg)) {
>> + if (!PMSG_IS_AUTO(msg) && dwc->phy_power_off) {
> should be able to detect this generically, no? Shouldn't
> device_may_wakeup() be valid here and give you the answer you want?

I think  device_may_wakeup() gives whether the controller is wake up
capable or not.

But we want to keep phy powered on only when some wakeup capable devices
(eg:keyboard ,mouse ) are connected to controller.

\
 
 \ /
  Last update: 2021-05-03 06:34    [W:0.069 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site