Message ID | 1653502826-24256-1-git-send-email-quic_kriskura@quicinc.com |
---|---|
Headers | show |
Series | USB DWC3 host wake up support from system suspend | expand |
On Wed, May 25, 2022 at 11:50:25PM +0530, Krishna Kurapati wrote: > From: Sandeep Maheswaram <quic_c_sanm@quicinc.com> > > Configure DP/DM line interrupts based on the USB2 device attached to > the root hub port. When HS/FS device is connected, configure the DP line > as falling edge to detect both disconnect and remote wakeup scenarios. When > LS device is connected, configure DM line as falling edge to detect both > disconnect and remote wakeup. When no device is connected, configure both > DP and DM lines as rising edge to detect HS/HS/LS device connect scenario. > > Signed-off-by: Sandeep Maheswaram <quic_c_sanm@quicinc.com> > Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com> > --- > drivers/usb/dwc3/dwc3-qcom.c | 72 ++++++++++++++++++++++++++++++++++++++------ > 1 file changed, 62 insertions(+), 10 deletions(-) > > diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c > index 7352124..56ecee0 100644 > --- a/drivers/usb/dwc3/dwc3-qcom.c > +++ b/drivers/usb/dwc3/dwc3-qcom.c <snip> > static int dwc3_qcom_suspend(struct dwc3_qcom *qcom) > @@ -355,8 +405,10 @@ static int dwc3_qcom_suspend(struct dwc3_qcom *qcom) > if (ret) > dev_warn(qcom->dev, "failed to disable interconnect: %d\n", ret); > > - if (device_may_wakeup(qcom->dev)) > + if (device_may_wakeup(qcom->dev)) { > + qcom->usb2_speed = dwc3_qcom_update_usb2_speed(qcom); > dwc3_qcom_enable_interrupts(qcom); > + } dwc3_qcom_update_usb2_speed() is not updating anything. can you rename the function to dwc3_qcom_get_usb2_speed()? Thanks, Pavan
On Wed, May 25, 2022 at 11:50:26PM +0530, Krishna Kurapati wrote: > From: Sandeep Maheswaram <quic_c_sanm@quicinc.com> > > If dwc3 is wakeup capable, keep the power domain always ON so that > wakeup from system suspend can be supported. Otherwise, keep the > power domain ON only during runtime suspend to support wakeup from > runtime suspend. > > Signed-off-by: Sandeep Maheswaram <quic_c_sanm@quicinc.com> > Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com> > --- > drivers/usb/dwc3/dwc3-qcom.c | 28 +++++++++++++++++++++------- > 1 file changed, 21 insertions(+), 7 deletions(-) > > <snip> > - device_init_wakeup(&pdev->dev, 1); > + if (device_can_wakeup(&qcom->dwc3->dev)) { > + /* > + * Setting GENPD_FLAG_ALWAYS_ON flag takes care of keeping > + * GEMPD on in both RT suspend and System suspend cases. Few typos, otherwise looks good to me. %s/GEMPD/genpd %s/RT/runtime %s/System/system Thanks, Pavan