Hi, On Tue, Feb 12, 2013 at 01:38:52PM +0530, Vivek Gautam wrote: > Sorry for coming so late on this series :-(, was away actually. > Just trying with patches in 'dwc3-dev-pm-ops' branch of your tree. np > On Mon, Feb 11, 2013 at 3:22 PM, Felipe Balbi <balbi@xxxxxx> wrote: > > Add support for basic power management on > > the dwc3 driver. While there is still lots > > to improve for full PM support, this minimal > > patch will already make sure that we survive > > suspend-to-ram and suspend-to-disk without > > major issues. > > > > Cc: Vikas C Sajjan <vikas.sajjan@xxxxxxxxxx> > > Signed-off-by: Felipe Balbi <balbi@xxxxxx> > > --- > > drivers/usb/dwc3/core.c | 108 ++++++++++++++++++++++++++++++++++++++++++++++ > > drivers/usb/dwc3/core.h | 6 +++ > > drivers/usb/dwc3/gadget.c | 57 ++++++++++++++++++++++++ > > 3 files changed, 171 insertions(+) > > > > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c > > index fb93918..466b894 100644 > > --- a/drivers/usb/dwc3/core.c > > +++ b/drivers/usb/dwc3/core.c > > @@ -583,11 +583,119 @@ static int dwc3_remove(struct platform_device *pdev) > > return 0; > > } > > > > +#ifdef CONFIG_PM > > +static int dwc3_prepare(struct device *dev) > > +{ > > + struct dwc3 *dwc = dev_get_drvdata(dev); > > + unsigned long flags; > > + > > + spin_lock_irqsave(&dwc->lock, flags); > > + > > + switch (dwc->mode) { > > + case DWC3_MODE_DEVICE: > > + case DWC3_MODE_DRD: > > + dwc3_gadget_prepare(dwc); > > Compiling Host only mode of DWC3 will give linker error :-( > > drivers/built-in.o: In function `dwc3_resume': > drivers/usb/dwc3/core.c:675: undefined reference to `dwc3_gadget_resume' > drivers/built-in.o: In function `dwc3_suspend': > drivers/usb/dwc3/core.c:649: undefined reference to `dwc3_gadget_suspend' > drivers/built-in.o: In function `dwc3_complete': > drivers/usb/dwc3/core.c:628: undefined reference to `dwc3_gadget_complete' > drivers/built-in.o: In function `dwc3_prepare': > drivers/usb/dwc3/core.c:605: undefined reference to `dwc3_gadget_prepare' > > we will need to check the "mode" here, since dwc3/gadget.c won't be > compiling for Host only mode. nice catch, I'll fix that up :-) -- balbi
Attachment:
signature.asc
Description: Digital signature