Re: [RFC PATCH 2/2] usb: dwc2: add bus suspend/resume for dwc2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, Oct 16, 2014 at 09:51:38AM -0700, Kever Yang wrote:
> >>This patch add suspend/resume for dwc2 hcd controller.
> >adds
> >
> >>Signed-off-by: Kever Yang <kever.yang@xxxxxxxxxxxxxx>
> >>---
> >>
> >>  drivers/usb/dwc2/hcd.c | 71 ++++++++++++++++++++++++++++++++++++++++++--------
> >>  1 file changed, 60 insertions(+), 11 deletions(-)
> >>
> >>diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
> >>index fddd923..c1801d8 100644
> >>--- a/drivers/usb/dwc2/hcd.c
> >>+++ b/drivers/usb/dwc2/hcd.c
> >>@@ -1474,6 +1474,23 @@ static void dwc2_port_suspend(struct dwc2_hsotg *hsotg, u16 windex)
> >>  	}
> >>  }
> >>+static void dwc2_port_resume(struct dwc2_hsotg *hsotg)
> >>+{
> >>+	u32 hprt0;
> >>+
> >>+	writel(0, hsotg->regs + PCGCTL);
> >>+	usleep_range(20000, 40000);
> >why this usleep_range() ? Is it documented somewhere ? How about adding
> >a comment explaining why you need to wait at least 20ms ?
> This is a straight copy of CLEAR_FEATURE(PORT_SUSPEND) code
> in dwc2_hcd_hub_control(), maybe Paul knows the detail?

Probably :-)

> I will check with USB2.0 spec and DWC databook to figure out
> how long the delay it should be.

Thank you, that helps.

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux