Re: [PATCH v6 09/12] usb: gadget: udc: adapt to OTG core

2016-05-03 Thread Roger Quadros
Peter, On 04/05/16 06:35, Peter Chen wrote: > On Tue, May 03, 2016 at 06:44:46PM +0300, Roger Quadros wrote: >> Hi, >> >> On 03/05/16 10:06, Jun Li wrote: >>> Hi >>> >>>>>>>>>>> /** >>>>>>&g

Re: [PATCH v6 09/12] usb: gadget: udc: adapt to OTG core

2016-05-04 Thread Roger Quadros
On 04/05/16 11:03, Jun Li wrote: > Hi > >> -Original Message----- >> From: Roger Quadros [mailto:rog...@ti.com] >> Sent: Wednesday, May 04, 2016 2:37 PM >> To: Peter Chen >> Cc: Jun Li ; st...@rowland.harvard.edu; ba...@kernel.org; >> gre...@lin

Re: [PATCH v7 10/14] usb: otg: add hcd companion support

2016-05-04 Thread Roger Quadros
On 04/05/16 16:17, Rob Herring wrote: > On Mon, May 02, 2016 at 03:18:53PM +0300, Roger Quadros wrote: >> From: Yoshihiro Shimoda >> >> Since some host controller (e.g. EHCI) needs a companion host controller >> (e.g. OHCI), this patch adds such a configuration t

Re: [PATCH v7 03/14] usb: hcd.h: Add OTG to HCD interface

2016-05-09 Thread Roger Quadros
On 06/05/16 12:41, Peter Chen wrote: > On Mon, May 02, 2016 at 03:18:46PM +0300, Roger Quadros wrote: >> The OTG core will use struct otg_hcd_ops to interface >> with the HCD controller. >> >> The main purpose of this interface is to avoid directly >> calling H

Re: [PATCH v7 11/14] usb: otg: use dev_dbg() instead of VDBG()

2016-05-09 Thread Roger Quadros
On 06/05/16 12:04, Peter Chen wrote: > On Mon, May 02, 2016 at 03:18:54PM +0300, Roger Quadros wrote: >> Now that we have a device reference in struct usb_otg >> let's use dev_dbg() for debug messages. >> >> Signed-off-by: Roger Quadros >> --- >

Re: [PATCH v7 03/14] usb: hcd.h: Add OTG to HCD interface

2016-05-10 Thread Roger Quadros
On 10/05/16 06:14, Peter Chen wrote: > On Mon, May 09, 2016 at 12:45:38PM +0300, Roger Quadros wrote: >> On 06/05/16 12:41, Peter Chen wrote: >>> On Mon, May 02, 2016 at 03:18:46PM +0300, Roger Quadros wrote: >>>> The OTG core will use struct otg_hcd_ops to interfac

Re: [PATCH v7 03/14] usb: hcd.h: Add OTG to HCD interface

2016-05-10 Thread Roger Quadros
On 10/05/16 11:12, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> On 10/05/16 06:14, Peter Chen wrote: >>> On Mon, May 09, 2016 at 12:45:38PM +0300, Roger Quadros wrote: >>>> On 06/05/16 12:41, Peter Chen wrote: >>>>> On Mon,

Re: [PATCH v7 03/14] usb: hcd.h: Add OTG to HCD interface

2016-05-10 Thread Roger Quadros
On 10/05/16 11:03, Jun Li wrote: > Hi > >> -Original Message----- >> From: Roger Quadros [mailto:rog...@ti.com] >> Sent: Tuesday, May 10, 2016 3:35 PM >> To: Peter Chen >> Cc: peter.c...@freescale.com; st...@rowland.harvard.edu; ba...@kernel.org; >&g

[PATCH v7 3/5] usb: dwc3: omap: Don't set POWERPRESENT

2016-05-10 Thread Roger Quadros
fields in the same register." Signed-off-by: Roger Quadros --- drivers/usb/dwc3/dwc3-omap.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index a30944d..1f7259d 100644 --- a/drivers/usb/dwc3/dw

[PATCH v7 4/5] usb: dwc3: omap: Pass VBUS and ID events transparently

2016-05-10 Thread Roger Quadros
Don't make any decisions regarding VBUS session based on ID status. That is best left to the OTG core. Pass ID and VBUS events independent of each other so that OTG core knows exactly what to do. This makes dual-role with extcon work with OTG irq on OMAP platforms. Signed-off-by: Roger Qu

[PATCH v7 0/5] dwc3: omap: fixes and dual-role preparation

2016-05-10 Thread Roger Quadros
flow in TRM strictly. - use tracepoints instead of dev_dbg(). - match IRQ flags in dwc3_omap and core.c for shared otg interrupt. v5: Internal revision. Not sent to mailing list. v4: first version that was reviewed. cheers, -roger Roger Quadros (5): usb: dwc3: omap: use request_threaded_irq() u

[PATCH v7 5/5] usb: dwc3: core: cleanup IRQ resources

2016-05-10 Thread Roger Quadros
compatibility for a single named interrupt for all 3 interrupts (e.g. for dwc3-pci) and single unnamed interrupt for all 3 interrupts (e.g. old DT). Signed-off-by: Roger Quadros --- drivers/usb/dwc3/core.c | 26 -- drivers/usb/dwc3/core.h | 5 + drivers/usb/dwc3/gadget.c

[PATCH v7 1/5] usb: dwc3: omap: use request_threaded_irq()

2016-05-10 Thread Roger Quadros
x27;s IRQ flags. NOTE: OTG IRQ handler is yet to be added. This is a preparatory step. Signed-off-by: Roger Quadros --- drivers/usb/dwc3/dwc3-omap.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index 5

[PATCH v7 2/5] usb: dwc3: omap: Mark the interrupt handler as shared

2016-05-10 Thread Roger Quadros
On OMAPs, OTG events come on the same IRQ so we need to share this IRQ with the OTG device driver. Signed-off-by: Roger Quadros --- drivers/usb/dwc3/dwc3-omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index

Re: [PATCH v7 3/5] usb: dwc3: omap: Don't set POWERPRESENT

2016-05-10 Thread Roger Quadros
On 10/05/16 12:54, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> TRM [1] recommends that POWERPRESENT bit must not be >> set and left at it's default value of 0. >> >> [1] OMAP542x TRM - http://www.ti.com/lit/pdf/swpu249 >>

Re: [PATCH v7 4/5] usb: dwc3: omap: Pass VBUS and ID events transparently

2016-05-10 Thread Roger Quadros
On 10/05/16 12:55, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> Don't make any decisions regarding VBUS session based on ID >> status. That is best left to the OTG core. >> >> Pass ID and VBUS events independent of each other so that OTG >

Re: [PATCH v7 1/5] usb: dwc3: omap: use request_threaded_irq()

2016-05-10 Thread Roger Quadros
On 10/05/16 12:58, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> We intend to share this interrupt with the OTG driver an to ensure >> that irqflags match for the shared interrupt handlers we use >> request_threaded_irq() >> >> If we d

Re: [PATCH v7 5/5] usb: dwc3: core: cleanup IRQ resources

2016-05-10 Thread Roger Quadros
On 10/05/16 13:03, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> Implementations might use different IRQs for >> host, gadget and OTG so use named interrupt resources >> to allow Device tree to specify the 3 interrupts. >> >> Followin

Re: [PATCH v7 4/5] usb: dwc3: omap: Pass VBUS and ID events transparently

2016-05-10 Thread Roger Quadros
On 10/05/16 13:05, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> On 10/05/16 12:55, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Roger Quadros writes: >>>> Don't make any decisions regarding VBUS session based on I

Re: [PATCH v7 1/5] usb: dwc3: omap: use request_threaded_irq()

2016-05-10 Thread Roger Quadros
On 10/05/16 13:12, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >>>> @@ -497,8 +503,8 @@ static int dwc3_omap_probe(struct platform_device >>>> *pdev) >>>>/* check the DMA Status */ >>>>reg = dwc3_om

Re: [PATCH v7 3/5] usb: dwc3: omap: Don't set POWERPRESENT

2016-05-10 Thread Roger Quadros
On 10/05/16 13:04, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> On 10/05/16 12:54, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Roger Quadros writes: >>>> TRM [1] recommends that POWERPRESENT bit must not be >>>&

Re: [PATCH v7 3/5] usb: dwc3: omap: Don't set POWERPRESENT

2016-05-10 Thread Roger Quadros
On 10/05/16 13:04, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> On 10/05/16 12:54, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Roger Quadros writes: >>>> TRM [1] recommends that POWERPRESENT bit must not be >&g

Re: [PATCH v7 5/5] usb: dwc3: core: cleanup IRQ resources

2016-05-10 Thread Roger Quadros
On 10/05/16 13:14, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >>>> diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h >>>> index 186a886..2e20892 100644 >>>> --- a/drivers/usb/dwc3/core.h >>>> +

Re: [PATCH v7 1/5] usb: dwc3: omap: use request_threaded_irq()

2016-05-11 Thread Roger Quadros
Felipe, On 10/05/16 13:12, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >>>> @@ -497,8 +503,8 @@ static int dwc3_omap_probe(struct platform_device >>>> *pdev) >>>>/* check the DMA Status */ >>>>reg = dwc3_om

Re: [PATCH v7 05/14] usb: otg-fsm: move host controller operations into usb_otg->hcd_ops

2016-05-11 Thread Roger Quadros
On 11/05/16 09:10, Peter Chen wrote: > On Mon, May 02, 2016 at 03:18:48PM +0300, Roger Quadros wrote: >> This is to prevent missing symbol build error if OTG is >> enabled (built-in) and HCD core (CONFIG_USB) is module. >> >> Signed-off-by: Roger Quadr

Re: [PATCH v7 08/14] usb: otg: add OTG/dual-role core

2016-05-11 Thread Roger Quadros
On 11/05/16 11:34, Peter Chen wrote: > On Mon, May 02, 2016 at 03:18:51PM +0300, Roger Quadros wrote: >> + >> +if (config->otg_work) /* custom otg_work ? */ >> +INIT_WORK(&otg->work, config->otg_work); >> +else >> +

Re: [PATCH v7 09/14] usb: of: add an API to get OTG device from USB controller node

2016-05-11 Thread Roger Quadros
On 11/05/16 11:40, Peter Chen wrote: > On Mon, May 02, 2016 at 03:18:52PM +0300, Roger Quadros wrote: >> The OTG controller and the USB controller an be linked via the > > Typo? Will fix. cheers, -roger > > Others are ok for me. > > Acked-by: Peter Chen > &

Re: [PATCH v7 00/14] USB OTG/dual-role framework

2016-05-11 Thread Roger Quadros
On 11/05/16 11:36, Peter Chen wrote: > On Mon, May 02, 2016 at 03:18:43PM +0300, Roger Quadros wrote: >> Hi, >> >> This series centralizes OTG/Dual-role functionality in the kernel. >> As of now I've got Dual-role functionality working pretty reliably on >>

Re: [PATCH v7 1/5] usb: dwc3: omap: use request_threaded_irq()

2016-05-11 Thread Roger Quadros
On 11/05/16 12:47, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >>> Roger Quadros writes: >>>>>> @@ -497,8 +503,8 @@ static int dwc3_omap_probe(struct platform_device >>>>>> *pdev) >>>>>>

Re: [PATCH v7 05/14] usb: otg-fsm: move host controller operations into usb_otg->hcd_ops

2016-05-11 Thread Roger Quadros
Peter, On 11/05/16 14:02, Roger Quadros wrote: > On 11/05/16 09:10, Peter Chen wrote: >> On Mon, May 02, 2016 at 03:18:48PM +0300, Roger Quadros wrote: >>> This is to prevent missing symbol build error if OTG is >>> enabled (built-in) and HCD core (CONFIG_USB) is mo

Re: [PATCH v7 1/5] usb: dwc3: omap: use request_threaded_irq()

2016-05-11 Thread Roger Quadros
On 11/05/16 15:39, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >>>>> static irqreturn_t dwc3_omap_threaded_interrupt(int irq, void *_omap) >>>>> { >>>>> struct dwc3_omap *omap = _omap; >>>>> u32

Re: [PATCH v7 10/14] usb: otg: add hcd companion support

2016-05-11 Thread Roger Quadros
On 11/05/16 16:54, Rob Herring wrote: > On Wed, May 04, 2016 at 04:47:18PM +0300, Roger Quadros wrote: >> On 04/05/16 16:17, Rob Herring wrote: >>> On Mon, May 02, 2016 at 03:18:53PM +0300, Roger Quadros wrote: >>>> From: Yoshihiro Shimoda >>>> >>

[PATCH v8 4/5] usb: dwc3: omap: Pass VBUS and ID events transparently

2016-05-11 Thread Roger Quadros
Don't make any decisions regarding VBUS session based on ID status. That is best left to the OTG core. Pass ID and VBUS events independent of each other so that OTG core knows exactly what to do. This makes dual-role with extcon work with OTG irq on OMAP platforms. Signed-off-by: Roger Qu

[PATCH v8 2/5] usb: dwc3: omap: Mark the interrupt handler as shared

2016-05-11 Thread Roger Quadros
On OMAPs, OTG events come on the same IRQ so we need to share this IRQ with the OTG device driver. Signed-off-by: Roger Quadros --- drivers/usb/dwc3/dwc3-omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index

[PATCH v8 5/5] usb: dwc3: core: cleanup IRQ resources

2016-05-11 Thread Roger Quadros
compatibility for a single named interrupt for all 3 interrupts (e.g. for dwc3-pci) and single unnamed interrupt for all 3 interrupts (e.g. old DT). Signed-off-by: Roger Quadros --- drivers/usb/dwc3/core.c | 10 -- drivers/usb/dwc3/core.h | 3 +++ drivers/usb/dwc3/gadget.c | 23

[PATCH v8 3/5] usb: dwc3: omap: Don't set POWERPRESENT

2016-05-11 Thread Roger Quadros
fields in the same register." Signed-off-by: Roger Quadros --- drivers/usb/dwc3/dwc3-omap.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index b58546c..dd55e08 100644 --- a/drivers/usb/dwc3/dw

[PATCH v8 0/5] dwc3: omap: fixes and dual-role preparation

2016-05-11 Thread Roger Quadros
flags in dwc3_omap and core.c for shared otg interrupt. v5: Internal revision. Not sent to mailing list. v4: first version that was reviewed. cheers, -roger Roger Quadros (5): usb: dwc3: omap: use request_threaded_irq() usb: dwc3: omap: Mark the interrupt handler as shared usb: dwc3: omap:

[PATCH v8 1/5] usb: dwc3: omap: use request_threaded_irq()

2016-05-11 Thread Roger Quadros
x27;s IRQ flags. NOTE: OTG IRQ handler is yet to be added. This is a preparatory step. Signed-off-by: Roger Quadros --- drivers/usb/dwc3/dwc3-omap.c | 32 ++-- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/d

Re: [PATCH v7 05/14] usb: otg-fsm: move host controller operations into usb_otg->hcd_ops

2016-05-12 Thread Roger Quadros
On 12/05/16 11:18, Peter Chen wrote: > On Wed, May 11, 2016 at 03:32:30PM +0300, Roger Quadros wrote: >> Peter, >> >> On 11/05/16 14:02, Roger Quadros wrote: >>> On 11/05/16 09:10, Peter Chen wrote: >>>> On Mon, May 02, 2016 at 03:18:48PM +0300, Rog

Re: [PATCH v7 10/14] usb: otg: add hcd companion support

2016-05-12 Thread Roger Quadros
On 12/05/16 07:00, Yoshihiro Shimoda wrote: > Hi, > >> From: Alan Stern >> Sent: Wednesday, May 11, 2016 11:47 PM >> >> On Wed, 11 May 2016, Roger Quadros wrote: >> >>>> What I mean is if you have 2 EHCI controllers with 2 companion >>>&

Re: [PATCH v7 10/14] usb: otg: add hcd companion support

2016-05-12 Thread Roger Quadros
Hi, On 12/05/16 11:34, Roger Quadros wrote: > On 12/05/16 07:00, Yoshihiro Shimoda wrote: >> Hi, >> >>> From: Alan Stern >>> Sent: Wednesday, May 11, 2016 11:47 PM >>> >>> On Wed, 11 May 2016, Roger Quadros wrote: >>> >>

Re: [PATCH v7 10/14] usb: otg: add hcd companion support

2016-05-12 Thread Roger Quadros
Hi, On 12/05/16 13:31, Yoshihiro Shimoda wrote: > Hi, > >> From: Roger Quadros >> Sent: Thursday, May 12, 2016 6:32 PM >> >> Hi, >> >> On 12/05/16 11:34, Roger Quadros wrote: >>> On 12/05/16 07:00, Yoshihiro Shimoda wrote: >>>> Hi,

[PATCH v8 14/14] usb: host: xhci-plat: Add otg device to platform data

2016-05-13 Thread Roger Quadros
Host controllers that are part of an OTG/dual-role instance need to somehow pass the OTG controller device information to the HCD core. We use platform data to pass the OTG controller device. Signed-off-by: Roger Quadros Reviewed-by: Peter Chen --- drivers/usb/host/xhci-plat.c | 35

[PATCH v8 11/14] usb: otg: use dev_dbg() instead of VDBG()

2016-05-13 Thread Roger Quadros
Now that we have a device reference in struct usb_otg let's use dev_dbg() for debug messages. Signed-off-by: Roger Quadros Acked-by: Peter Chen --- drivers/usb/common/usb-otg-fsm.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/usb/commo

[PATCH v8 09/14] usb: of: add an API to get OTG device from USB controller node

2016-05-13 Thread Roger Quadros
The OTG controller and the USB controller can be linked via the 'otg-controller' property in the USB controller's device node. of_usb_get_otg() can be used to get the OTG controller device from the USB controller's device node. Signed-off-by: Roger Quadros

[PATCH v8 12/14] usb: hcd: Adapt to OTG core

2016-05-13 Thread Roger Quadros
evice. Signed-off-by: Roger Quadros Acked-by: Peter Chen --- drivers/usb/core/hcd.c | 55 + include/linux/usb/hcd.h | 4 2 files changed, 59 insertions(+) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 9484539..cfc8232 1

[PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-05-13 Thread Roger Quadros
circular locking dependency. Ignore softconnect sysfs control when we're in OTG mode as OTG FSM takes care of gadget softconnect using the b_bus_req mechanism. Signed-off-by: Roger Quadros --- drivers/usb/gadget/udc/udc-core.c | 194 -- include/linu

[PATCH v8 07/14] usb: otg: get rid of CONFIG_USB_OTG_FSM in favour of CONFIG_USB_OTG

2016-05-13 Thread Roger Quadros
Let's use CONFIG_USB_OTG as a single config option to enable USB OTG and the OTG FSM. This makes things a lot less confusing. Update all users of CONFIG_USB_OTG_FSM to CONFIG_USB_OTG. Signed-off-by: Roger Quadros Acked-by: Peter Chen --- Documentation/usb/chipidea.txt | 2 +- driver

[PATCH v8 06/14] usb: gadget.h: Add OTG to gadget interface

2016-05-13 Thread Roger Quadros
The OTG core will use struct otg_gadget_ops to start/stop the gadget controller. The main purpose of this interface is to avoid directly calling usb_gadget_start/stop() from the OTG core as they wouldn't be defined in the built-in symbol table if CONFIG_USB_GADGET is m. Signed-off-by:

[PATCH v8 05/14] usb: otg-fsm: move host controller operations into usb_otg->hcd_ops

2016-05-13 Thread Roger Quadros
This is to prevent missing symbol build error if OTG is enabled (built-in) and HCD core (CONFIG_USB) is module. Signed-off-by: Roger Quadros Acked-by: Peter Chen --- drivers/usb/chipidea/otg_fsm.c | 7 +++ drivers/usb/common/usb-otg-fsm.c | 15 +++ drivers/usb/phy/phy-fsl

[PATCH v8 04/14] usb: otg-fsm: use usb_otg wherever possible

2016-05-13 Thread Roger Quadros
Move otg_fsm into usb_otg and use usb_otg wherever possible in the usb_otg APIs. Signed-off-by: Roger Quadros Acked-by: Peter Chen --- drivers/usb/chipidea/ci.h| 1 - drivers/usb/chipidea/core.c | 14 +-- drivers/usb/chipidea/debug.c | 2 +- drivers/usb/chipidea/otg_fsm.c

[PATCH v8 08/14] usb: otg: add OTG/dual-role core

2016-05-13 Thread Roger Quadros
gged and a different cable type is inserted. As we don't need most of the complex OTG states and OTG timers we implement a lean DRD state machine in usb-otg.c. The DRD state machine is only interested in 2 hardware inputs 'id' and 'b_sess_vld'. Signed-off-by: Roger Quadro

[PATCH v8 10/14] usb: otg: add hcd companion support

2016-05-13 Thread Roger Quadros
From: Yoshihiro Shimoda Since some host controller (e.g. EHCI) needs a companion host controller (e.g. OHCI), this patch adds such a configuration to use it in the OTG core. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Roger Quadros Acked-by: Peter Chen --- Documentation/devicetree

[PATCH v8 02/14] usb: otg-fsm: Prevent build warning "VDBG" redefined

2016-05-13 Thread Roger Quadros
.h:33, from drivers/usb/dwc3/ep0.c:33: include/linux/usb/otg-fsm.h:30:1: warning: "VDBG" redefined In file included from drivers/usb/dwc3/ep0.c:31: include/linux/usb/composite.h:615:1: warning: this is the location of the previous definition Signed-off-by: Roger Quadros Acked

[PATCH v8 03/14] usb: hcd.h: Add OTG to HCD interface

2016-05-13 Thread Roger Quadros
The OTG core will use struct otg_hcd_ops to interface with the HCD controller. The main purpose of this interface is to avoid directly calling HCD APIs from the OTG core as they wouldn't be defined in the built-in symbol table if CONFIG_USB is m. Signed-off-by: Roger Quadros Acked-by:

[PATCH v8 01/14] usb: hcd: Initialize hcd->flags to 0

2016-05-13 Thread Roger Quadros
000 r5:c005cb64 r4:ee429940 [ 91.759209] handlers: [ 91.759255] [] usb_hcd_irq [usbcore] [ 91.759260] Disabling IRQ #254 Signed-off-by: Roger Quadros Reviewed-by: Peter Chen --- drivers/usb/core/hcd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/h

[PATCH v8 00/14] USB OTG/dual-role framework

2016-05-13 Thread Roger Quadros
r - added dual-role-device (DRD) state machine which is a much simpler mode of operation when compared to OTG. Here we don't support fancy OTG features like HNP, SRP, on the fly role-swap. The mode of operation is determined based on ID pin (cable type) and the role doesn't change till the c

Re: [PATCH v7 10/14] usb: otg: add hcd companion support

2016-05-16 Thread Roger Quadros
On 16/05/16 05:13, Peter Chen wrote: > On Thu, May 12, 2016 at 03:13:48PM +0300, Roger Quadros wrote: >> Hi, >> >> On 12/05/16 13:31, Yoshihiro Shimoda wrote: >>> Hi, >>> >>>> From: Roger Quadros >>>> Sent: Thursday, May 12, 2016 6

Re: [PATCH v8 10/14] usb: otg: add hcd companion support

2016-05-16 Thread Roger Quadros
On 13/05/16 21:13, Rob Herring wrote: > On Fri, May 13, 2016 at 5:03 AM, Roger Quadros wrote: >> From: Yoshihiro Shimoda >> >> Since some host controller (e.g. EHCI) needs a companion host controller >> (e.g. OHCI), this patch adds such a configuration to use it in th

Re: [PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-05-16 Thread Roger Quadros
Hi, On 16/05/16 10:02, Peter Chen wrote: > On Fri, May 13, 2016 at 01:03:27PM +0300, Roger Quadros wrote: >> + >> +static int usb_gadget_connect_control(struct usb_gadget *gadget, bool >> connect) >> +{ >> +struct usb_udc *udc; >> + >

Re: [PATCH v7 10/14] usb: otg: add hcd companion support

2016-05-16 Thread Roger Quadros
On 16/05/16 11:13, Peter Chen wrote: > On Mon, May 16, 2016 at 11:01:27AM +0300, Roger Quadros wrote: >> On 16/05/16 05:13, Peter Chen wrote: >>> On Thu, May 12, 2016 at 03:13:48PM +0300, Roger Quadros wrote: >>>> Hi, >>>> >>>>

Re: [PATCH v8 08/14] usb: otg: add OTG/dual-role core

2016-05-16 Thread Roger Quadros
On 13/05/16 13:03, Roger Quadros wrote: > It provides APIs for the following tasks > > - Registering an OTG/dual-role capable controller > - Registering Host and Gadget controllers to OTG core > - Providing inputs to and kicking the OTG state machine > > Provide a dual-ro

Re: [PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-05-16 Thread Roger Quadros
On 16/05/16 12:23, Peter Chen wrote: > On Mon, May 16, 2016 at 11:26:57AM +0300, Roger Quadros wrote: >> Hi, >> >> On 16/05/16 10:02, Peter Chen wrote: >>> On Fri, May 13, 2016 at 01:03:27PM +0300, Roger Quadros wrote: >>>> + >>>> +static in

Re: [PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-05-17 Thread Roger Quadros
On 17/05/16 10:38, Jun Li wrote: > Hi > >> -Original Message----- >> From: Roger Quadros [mailto:rog...@ti.com] >> Sent: Monday, May 16, 2016 5:52 PM >> To: Peter Chen >> Cc: peter.c...@freescale.com; ba...@kernel.org; t...@atomide.com; >> gre...@lin

Re: [PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-05-18 Thread Roger Quadros
On 17/05/16 11:28, Jun Li wrote: > Hi Roger, > >> -Original Message----- >> From: Roger Quadros [mailto:rog...@ti.com] >> Sent: Tuesday, May 17, 2016 4:09 PM >> To: Jun Li ; Peter Chen >> Cc: peter.c...@freescale.com; ba...@kernel.org; t...@atomid

Re: [PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-05-18 Thread Roger Quadros
On 18/05/16 06:18, Peter Chen wrote: > On Mon, May 16, 2016 at 12:51:53PM +0300, Roger Quadros wrote: >> On 16/05/16 12:23, Peter Chen wrote: >>> On Mon, May 16, 2016 at 11:26:57AM +0300, Roger Quadros wrote: >>>> Hi, >>>> >>>> On 16/05/16 10:

Re: [PATCH v8 08/14] usb: otg: add OTG/dual-role core

2016-05-18 Thread Roger Quadros
Hi Peter, On 18/05/16 10:45, Peter Chen wrote: > > > On Mon, May 16, 2016 at 5:00 PM, Roger Quadros <mailto:rog...@ti.com>> wrote: > > On 13/05/16 13:03, Roger Quadros wrote: > > It provides APIs for the following tasks > > > > - Regis

Re: [PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-05-18 Thread Roger Quadros
On 18/05/16 16:12, Jun Li wrote: > Hi > >> -Original Message----- >> From: Roger Quadros [mailto:rog...@ti.com] >> Sent: Wednesday, May 18, 2016 8:43 PM >> To: Jun Li ; Peter Chen >> Cc: peter.c...@freescale.com; ba...@kernel.org; t...@atomide.com; >&g

Re: [PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-05-19 Thread Roger Quadros
On 18/05/16 17:46, Jun Li wrote: > > I didn't want to have complex Kconfig so decided to have otg as built-in only. What do you want me to change in existing code? and why? >>> >>> Remove those stuff which only for pass diff driver config Like every >>> controller driver need

Re: [PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-05-20 Thread Roger Quadros
Peter, On 20/05/16 04:39, Peter Chen wrote: > On Wed, May 18, 2016 at 03:45:11PM +0300, Roger Quadros wrote: >> On 18/05/16 06:18, Peter Chen wrote: >>> On Mon, May 16, 2016 at 12:51:53PM +0300, Roger Quadros wrote: >>>> On 16/05/16 12:23, Peter Chen wrote: >&

Re: [PATCH v8 08/14] usb: otg: add OTG/dual-role core

2016-05-20 Thread Roger Quadros
On 18/05/16 15:59, Roger Quadros wrote: > Hi Peter, > > On 18/05/16 10:45, Peter Chen wrote: >> >> >> On Mon, May 16, 2016 at 5:00 PM, Roger Quadros > <mailto:rog...@ti.com>> wrote: >> >> On 13/05/16 13:03, Roger Quadros wrote

Re: [PATCH v8 08/14] usb: otg: add OTG/dual-role core

2016-05-20 Thread Roger Quadros
On 20/05/16 11:31, Roger Quadros wrote: > On 18/05/16 15:59, Roger Quadros wrote: >> Hi Peter, >> >> On 18/05/16 10:45, Peter Chen wrote: >>> >>> >>> On Mon, May 16, 2016 at 5:00 PM, Roger Quadros >> <mailto:rog...@ti.com>> wrote: &

[PATCH v9 09/14] usb: of: add an API to get OTG device from USB controller node

2016-05-20 Thread Roger Quadros
The OTG controller and the USB controller can be linked via the 'otg-controller' property in the USB controller's device node. of_usb_get_otg() can be used to get the OTG controller device from the USB controller's device node. Signed-off-by: Roger Quadros Acked-by: Peter C

[PATCH v9 10/14] usb: otg: add hcd companion support

2016-05-20 Thread Roger Quadros
Since some host controller (e.g. EHCI) needs a companion host controller (e.g. OHCI), this patch adds such a configuration to use it in the OTG core. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Roger Quadros Acked-by: Peter Chen --- v9: - add DT property documentation under OTG controllers

Re: [PATCH v8 08/14] usb: otg: add OTG/dual-role core

2016-05-23 Thread Roger Quadros
On 20/05/16 12:53, Peter Chen wrote: > On Fri, May 20, 2016 at 12:19:07PM +0300, Roger Quadros wrote: >> On 20/05/16 11:31, Roger Quadros wrote: >>> On 18/05/16 15:59, Roger Quadros wrote: >>>> Hi Peter, >>>> >>>> On 18/05/16 10:45, Peter Chen

Re: [PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-05-23 Thread Roger Quadros
On 23/05/16 06:21, Peter Chen wrote: > On Sat, May 21, 2016 at 10:29:40AM +0800, Peter Chen wrote: >> On Thu, May 19, 2016 at 10:32:44AM +0300, Roger Quadros wrote: >>> On 18/05/16 17:46, Jun Li wrote: >>>> >>>> >>>>>>> >>

Re: [PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-05-23 Thread Roger Quadros
On 23/05/16 13:34, Jun Li wrote: > Hi > >> -Original Message----- >> From: Roger Quadros [mailto:rog...@ti.com] >> Sent: Monday, May 23, 2016 6:12 PM >> To: Peter Chen >> Cc: Jun Li ; peter.c...@freescale.com; ba...@kernel.org; >> t...@atomide.co

Re: [PATCH v8 08/14] usb: otg: add OTG/dual-role core

2016-05-24 Thread Roger Quadros
Hi Peter, I have one question here. Please see below. On 13/05/16 13:03, Roger Quadros wrote: > It provides APIs for the following tasks > > - Registering an OTG/dual-role capable controller > - Registering Host and Gadget controllers to OTG core > - Providing inputs to and

Re: [PATCH v8 5/5] usb: dwc3: core: cleanup IRQ resources

2016-05-24 Thread Roger Quadros
On 24/05/16 12:35, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> Implementations might use different IRQs for >> host, gadget and OTG so use named interrupt resources >> to allow Device tree to specify the 3 interrupts. >> >> Followin

Re: [PATCH v8 08/14] usb: otg: add OTG/dual-role core

2016-05-25 Thread Roger Quadros
On 25/05/16 05:44, Peter Chen wrote: > On Tue, May 24, 2016 at 12:45:46PM +0300, Roger Quadros wrote: >> Hi Peter, >> >> I have one question here. Please see below. >> >> On 13/05/16 13:03, Roger Quadros wrote: >>> It provides APIs for the following ta

Re: [PATCH v8 08/14] usb: otg: add OTG/dual-role core

2016-05-25 Thread Roger Quadros
On 25/05/16 06:19, Jun Li wrote: > > >> -Original Message- >> From: Peter Chen [mailto:hzpeterc...@gmail.com] >> Sent: Wednesday, May 25, 2016 10:44 AM >> To: Roger Quadros >> Cc: peter.c...@freescale.com; ba...@kernel.org; t...@atomide.com; >&g

Re: [PATCH 23/62] usb: dwc3: implement runtime PM

2016-05-30 Thread Roger Quadros
Hi Felipe, On 30/05/16 14:35, Felipe Balbi wrote: > this patch implements the most basic pm_runtime > support for dwc3. Whenever USB cable is dettached, > then we will allow core to runtime_suspend. > > Runtime suspending will involve completely tearing > down event buffers and require a full sof

Re: [PATCH v8 00/14] USB OTG/dual-role framework

2016-05-30 Thread Roger Quadros
On 30/05/16 12:29, Peter Chen wrote: > On Fri, May 13, 2016 at 01:03:14PM +0300, Roger Quadros wrote: >> Hi, >> >> This series centralizes OTG/Dual-role functionality in the kernel. >> As of now I've got Dual-role functionality working pretty reliably on >> d

[PATCH v9 5/5] usb: dwc3: core: cleanup IRQ resources

2016-06-01 Thread Roger Quadros
compatibility for a single named interrupt for all 3 interrupts (e.g. for dwc3-pci) and single unnamed interrupt for all 3 interrupts (e.g. old DT). Signed-off-by: Roger Quadros --- v9: rebased on top of balbi/testing/next drivers/usb/dwc3/core.c | 10 -- drivers/usb/dwc3/gadget.c | 20

Re: [PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-06-02 Thread Roger Quadros
On 01/06/16 10:38, Peter Chen wrote: > On Fri, May 13, 2016 at 01:03:27PM +0300, Roger Quadros wrote: >> @@ -530,6 +683,8 @@ void usb_del_gadget_udc(struct usb_gadget *gadget) >> } >> mutex_unlock(&udc_lock); >> >> +mutex_unlock(&udc

Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux

2016-06-06 Thread Roger Quadros
Hi, On 06/06/16 06:04, Lu Baolu wrote: > Hi Peter, > > On 06/06/2016 09:25 AM, Peter Chen wrote: >> On Sun, Jun 05, 2016 at 02:55:56PM +0800, Lu Baolu wrote: >>> Hi Peter, >>> >>> On 06/04/2016 10:28 AM, Peter Chen wrote: On Sat, Jun 04, 2016 at 12:06:06AM +0800, Lu Baolu wrote: >> from

Re: [PATCH 23/62] usb: dwc3: implement runtime PM

2016-06-07 Thread Roger Quadros
Felipe, On 30/05/16 15:42, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> On 30/05/16 14:35, Felipe Balbi wrote: >>> this patch implements the most basic pm_runtime >>> support for dwc3. Whenever USB cable is dettached, >>> then we will a

Re: [PATCH v9 5/5] usb: dwc3: core: cleanup IRQ resources

2016-06-07 Thread Roger Quadros
Felipe, On 01/06/16 11:06, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> Implementations might use different IRQs for >> host, gadget and OTG so use named interrupt resources >> to allow Device tree to specify the 3 interrupts. >>

Re: [PATCH v9 5/5] usb: dwc3: core: cleanup IRQ resources

2016-06-07 Thread Roger Quadros
On 02/06/16 14:52, Grygorii Strashko wrote: > On 06/01/2016 10:46 AM, Roger Quadros wrote: >> Implementations might use different IRQs for >> host, gadget and OTG so use named interrupt resources >> to allow Device tree to specify the 3 interrupts. >> >>

Re: [PATCH v9 5/5] usb: dwc3: core: cleanup IRQ resources

2016-06-07 Thread Roger Quadros
On 07/06/16 14:49, Grygorii Strashko wrote: > On 06/07/2016 12:34 PM, Roger Quadros wrote: >> On 02/06/16 14:52, Grygorii Strashko wrote: >>> On 06/01/2016 10:46 AM, Roger Quadros wrote: >>>> Implementations might use different IRQs for >>>> host, gadge

Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux

2016-06-07 Thread Roger Quadros
On 07/06/16 12:27, Lu Baolu wrote: > Hi, > > On 06/07/2016 02:34 PM, Jun Li wrote: On 06/07/2016 11:03 AM, Jun Li wrote: >> Hi Roger >> For Mux devices implementing dual-role, the mux device driver _must_ use OTG/dual-role core API so that a common ABI is pr

Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux

2016-06-07 Thread Roger Quadros
On 07/06/16 12:53, Lu Baolu wrote: > Hi, > > On 06/07/2016 11:03 AM, Jun Li wrote: >> Hi Roger >> >>> >>> For Mux devices implementing dual-role, the mux device driver _must_ use >>> OTG/dual-role core API so that a common ABI is presented to user space for >>> OTG/dual-role. >> That's the only

Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux

2016-06-07 Thread Roger Quadros
On 07/06/16 16:04, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >>> But you said I must run an unnecessary OTG state machine, even thought it >>> has nothing to do with my system, only because the two sides of my port >>> mux device is a host and

Re: [PATCH v9 5/5] usb: dwc3: core: cleanup IRQ resources

2016-06-07 Thread Roger Quadros
On 07/06/16 16:09, Felipe Balbi wrote: > > Hi, > > (guys, please make sure to break lines at 80-columns) > > Roger Quadros writes: >>>>>> @@ -2853,6 +2852,23 @@ static irqreturn_t dwc3_interrupt(int irq, void >>>>>>

Re: [PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-06-08 Thread Roger Quadros
Hi, On 24/05/16 05:53, Peter Chen wrote: > On Mon, May 23, 2016 at 01:36:51PM +0300, Roger Quadros wrote: >> On 23/05/16 13:34, Jun Li wrote: >>> Hi >>> >>>> -Original Message- >>>> From: Roger Quadros [mailto:rog...@ti.com] >>

Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux

2016-06-08 Thread Roger Quadros
On 07/06/16 18:05, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >>> I might be able to find some time to implement a proof of concept which >>> would allow your platforms to get dual-role with code we already have, >>> but I need DWC3's OTG s

[PATCH v9 02/14] usb: otg-fsm: Prevent build warning "VDBG" redefined

2016-06-08 Thread Roger Quadros
.h:33, from drivers/usb/dwc3/ep0.c:33: include/linux/usb/otg-fsm.h:30:1: warning: "VDBG" redefined In file included from drivers/usb/dwc3/ep0.c:31: include/linux/usb/composite.h:615:1: warning: this is the location of the previous definition Signed-off-by: Roger Quadros Acked

[PATCH v9 14/14] usb: host: xhci-plat: Add otg device to platform data

2016-06-08 Thread Roger Quadros
Host controllers that are part of an OTG/dual-role instance need to somehow pass the OTG controller device information to the HCD core. We use platform data to pass the OTG controller device. Signed-off-by: Roger Quadros Reviewed-by: Peter Chen --- drivers/usb/host/xhci-plat.c | 35

[PATCH v9 13/14] usb: gadget: udc: adapt to OTG core

2016-06-08 Thread Roger Quadros
unlock the usb_lock mutex before calling usb_otg_register_gadget() else it will cause a circular locking dependency. Ignore softconnect sysfs control when we're in OTG mode as OTG FSM should care of gadget softconnect using the b_bus_req mechanism. Signed-off-by: Roger Quadros --- driver

[PATCH v9 12/14] usb: hcd: Adapt to OTG core

2016-06-08 Thread Roger Quadros
evice. Signed-off-by: Roger Quadros Acked-by: Peter Chen --- drivers/usb/core/hcd.c | 55 + include/linux/usb/hcd.h | 4 2 files changed, 59 insertions(+) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index ae6c76d..c6f4155 1

  1   2   3   4   5   6   7   8   9   10   >