Re: [PATCH v4 5/9] usb: dwc3: core: make dual-role work with OTG irq

2015-09-15 Thread Roger Quadros
On 06/09/15 05:20, Peter Chen wrote: > On Wed, Sep 02, 2015 at 09:43:38AM -0500, Felipe Balbi wrote: >> Hi, >> >>> + >>> +static irqreturn_t dwc3_otg_irq(int irq, void *_dwc) >>> +{ >>> + struct dwc3 *dwc = _dwc; >>> + irqreturn_t ret = IRQ_NONE; >>> + u32 reg; >>> + >>> + spin_lock(&dwc->l

Re: [PATCH v4 5/9] usb: dwc3: core: make dual-role work with OTG irq

2015-09-05 Thread Peter Chen
On Wed, Sep 02, 2015 at 09:43:38AM -0500, Felipe Balbi wrote: > Hi, > > > + > > +static irqreturn_t dwc3_otg_irq(int irq, void *_dwc) > > +{ > > + struct dwc3 *dwc = _dwc; > > + irqreturn_t ret = IRQ_NONE; > > + u32 reg; > > + > > + spin_lock(&dwc->lock); > > this seems unnecessary, we're

Re: [PATCH v4 5/9] usb: dwc3: core: make dual-role work with OTG irq

2015-09-04 Thread Roger Quadros
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 03/09/15 18:51, Felipe Balbi wrote: > Hi, > > On Thu, Sep 03, 2015 at 04:52:02PM +0300, Roger Quadros wrote: if (on) { - dwc3_set_mode(dwc, DWC3_GCTL_PRTCAP_HOST); + /* OCTL.PeriMode = 0 */ + reg

Re: [PATCH v4 5/9] usb: dwc3: core: make dual-role work with OTG irq

2015-09-03 Thread Felipe Balbi
Hi, On Thu, Sep 03, 2015 at 04:52:02PM +0300, Roger Quadros wrote: > >>if (on) { > >> - dwc3_set_mode(dwc, DWC3_GCTL_PRTCAP_HOST); > >> + /* OCTL.PeriMode = 0 */ > >> + reg = dwc3_readl(dwc->regs, DWC3_OCTL); > >> + reg &= ~DWC3_OCTL_PERIMODE; > >> +

Re: [PATCH v4 5/9] usb: dwc3: core: make dual-role work with OTG irq

2015-09-03 Thread Roger Quadros
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 02/09/15 17:43, Felipe Balbi wrote: > Hi, > > On Wed, Sep 02, 2015 at 05:24:20PM +0300, Roger Quadros wrote: >> If the ID pin event is not available over extcon >> then we rely on the OTG controller to provide us ID and VBUS >> information. >> >>

Re: [PATCH v4 5/9] usb: dwc3: core: make dual-role work with OTG irq

2015-09-02 Thread Felipe Balbi
Hi, On Wed, Sep 02, 2015 at 05:24:20PM +0300, Roger Quadros wrote: > If the ID pin event is not available over extcon > then we rely on the OTG controller to provide us ID and VBUS > information. > > We still don't support any OTG features but just > dual-role operation. > > Signed-off-by: Roger

[PATCH v4 5/9] usb: dwc3: core: make dual-role work with OTG irq

2015-09-02 Thread Roger Quadros
If the ID pin event is not available over extcon then we rely on the OTG controller to provide us ID and VBUS information. We still don't support any OTG features but just dual-role operation. Signed-off-by: Roger Quadros --- drivers/usb/dwc3/core.c | 217 +++