Re: [PATCH v12 1/6] usb: dwc3: core: Host wake up support from system suspend
From: Pavan Kondeti
Date: Mon Apr 11 2022 - 01:45:36 EST
On Thu, Apr 07, 2022 at 02:14:59PM +0530, Sandeep Maheswaram wrote:
> During suspend read the status of all port and set hs phy mode
> based on current speed. Use this hs phy mode to configure wakeup
> interrupts in qcom glue driver.
>
> Also check during suspend if any wakeup capable devices are
> connected to the controller (directly or through hubs), if there
> are none set a flag to indicate that the PHY is powered
> down during suspend.
>
> Signed-off-by: Sandeep Maheswaram <quic_c_sanm@xxxxxxxxxxx>
> ---
> drivers/usb/dwc3/core.c | 29 ++++++++++++++++++++---------
> drivers/usb/dwc3/core.h | 4 ++++
> drivers/usb/dwc3/host.c | 25 +++++++++++++++++++++++++
> 3 files changed, 49 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 1170b80..b102a22 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -32,6 +32,7 @@
> #include <linux/usb/gadget.h>
> #include <linux/usb/of.h>
> #include <linux/usb/otg.h>
> +#include <linux/usb/hcd.h>
>
> #include "core.h"
> #include "gadget.h"
> @@ -1723,6 +1724,7 @@ static int dwc3_probe(struct platform_device *pdev)
>
> platform_set_drvdata(pdev, dwc);
> dwc3_cache_hwparams(dwc);
> + device_init_wakeup(&pdev->dev, of_property_read_bool(dev->of_node, "wakeup-source"));
The current code calls device_init_wakeup(true) in runtime suspend and calls
device_init_wakeup(false) in runtime resume. We don't want that right now
given that we have a this new dT property. can you fix this please?
Thanks,
Pavan