Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-10 Thread Peter Chen
On Thu, Sep 10, 2015 at 05:17:36PM +0300, Roger Quadros wrote: > On 10/09/15 08:35, Peter Chen wrote: > > On Wed, Sep 09, 2015 at 01:21:50PM +0300, Roger Quadros wrote: > >> On 09/09/15 11:45, Peter Chen wrote: > >>> On Wed, Sep 09, 2015 at 12:33:20PM +0300, Roger Quadros wrote: > On 09/09/15

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-10 Thread Roger Quadros
On 10/09/15 08:35, Peter Chen wrote: > On Wed, Sep 09, 2015 at 01:21:50PM +0300, Roger Quadros wrote: >> On 09/09/15 11:45, Peter Chen wrote: >>> On Wed, Sep 09, 2015 at 12:33:20PM +0300, Roger Quadros wrote: On 09/09/15 11:13, Peter Chen wrote: > On Wed, Sep 09, 2015 at 12:08:10PM +0300,

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-10 Thread Roger Quadros
On 10/09/15 12:28, Li Jun wrote: > On Wed, Sep 09, 2015 at 01:01:14PM +0300, Roger Quadros wrote: > ... ... > >> +return -EINVAL; > > Return non-zero, then if err, do we need call usb_otg_add_hcd() after > usb_otg_register_hcd() fails? You should not call

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-10 Thread Li Jun
On Wed, Sep 09, 2015 at 01:01:14PM +0300, Roger Quadros wrote: ... ... > +return -EINVAL; > >>> > >>> Return non-zero, then if err, do we need call usb_otg_add_hcd() after > >>> usb_otg_register_hcd() fails? > >> > >> You should not call usb_otg_register_hcd() but usb_add_hcd(). > >>

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-10 Thread Peter Chen
On Wed, Sep 09, 2015 at 01:21:50PM +0300, Roger Quadros wrote: > On 09/09/15 11:45, Peter Chen wrote: > > On Wed, Sep 09, 2015 at 12:33:20PM +0300, Roger Quadros wrote: > >> On 09/09/15 11:13, Peter Chen wrote: > >>> On Wed, Sep 09, 2015 at 12:08:10PM +0300, Roger Quadros wrote: > On 09/09/15

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-10 Thread Peter Chen
On Wed, Sep 09, 2015 at 01:21:50PM +0300, Roger Quadros wrote: > On 09/09/15 11:45, Peter Chen wrote: > > On Wed, Sep 09, 2015 at 12:33:20PM +0300, Roger Quadros wrote: > >> On 09/09/15 11:13, Peter Chen wrote: > >>> On Wed, Sep 09, 2015 at 12:08:10PM +0300, Roger Quadros wrote: > On 09/09/15

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-10 Thread Li Jun
On Wed, Sep 09, 2015 at 01:01:14PM +0300, Roger Quadros wrote: ... ... > +return -EINVAL; > >>> > >>> Return non-zero, then if err, do we need call usb_otg_add_hcd() after > >>> usb_otg_register_hcd() fails? > >> > >> You should not call usb_otg_register_hcd() but usb_add_hcd(). > >>

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-10 Thread Roger Quadros
On 10/09/15 08:35, Peter Chen wrote: > On Wed, Sep 09, 2015 at 01:21:50PM +0300, Roger Quadros wrote: >> On 09/09/15 11:45, Peter Chen wrote: >>> On Wed, Sep 09, 2015 at 12:33:20PM +0300, Roger Quadros wrote: On 09/09/15 11:13, Peter Chen wrote: > On Wed, Sep 09, 2015 at 12:08:10PM +0300,

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-10 Thread Roger Quadros
On 10/09/15 12:28, Li Jun wrote: > On Wed, Sep 09, 2015 at 01:01:14PM +0300, Roger Quadros wrote: > ... ... > >> +return -EINVAL; > > Return non-zero, then if err, do we need call usb_otg_add_hcd() after > usb_otg_register_hcd() fails? You should not call

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-10 Thread Peter Chen
On Thu, Sep 10, 2015 at 05:17:36PM +0300, Roger Quadros wrote: > On 10/09/15 08:35, Peter Chen wrote: > > On Wed, Sep 09, 2015 at 01:21:50PM +0300, Roger Quadros wrote: > >> On 09/09/15 11:45, Peter Chen wrote: > >>> On Wed, Sep 09, 2015 at 12:33:20PM +0300, Roger Quadros wrote: > On 09/09/15

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-09 Thread Alan Stern
On Wed, 9 Sep 2015, Roger Quadros wrote: > (adding back folks in cc) > > On 08/09/15 20:35, Alan Stern wrote: > > On Tue, 8 Sep 2015, Roger Quadros wrote: > > > What if there is another architecture like so? > > C: > [Parent] > | >

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-09 Thread Roger Quadros
(adding back folks in cc) On 08/09/15 20:35, Alan Stern wrote: > On Tue, 8 Sep 2015, Roger Quadros wrote: > What if there is another architecture like so? C: [Parent] | |

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-09 Thread Roger Quadros
On 09/09/15 11:45, Peter Chen wrote: > On Wed, Sep 09, 2015 at 12:33:20PM +0300, Roger Quadros wrote: >> On 09/09/15 11:13, Peter Chen wrote: >>> On Wed, Sep 09, 2015 at 12:08:10PM +0300, Roger Quadros wrote: On 09/09/15 05:21, Peter Chen wrote: > On Tue, Sep 08, 2015 at 03:25:25PM +0300,

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-09 Thread Roger Quadros
On 09/09/15 09:20, Li Jun wrote: > On Mon, Sep 07, 2015 at 01:53:19PM +0300, Roger Quadros wrote: >> On 07/09/15 10:40, Li Jun wrote: >>> On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote: The OTG core instantiates the OTG Finite State Machine per OTG controller and manages

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-09 Thread Peter Chen
On Wed, Sep 09, 2015 at 12:33:20PM +0300, Roger Quadros wrote: > On 09/09/15 11:13, Peter Chen wrote: > > On Wed, Sep 09, 2015 at 12:08:10PM +0300, Roger Quadros wrote: > >> On 09/09/15 05:21, Peter Chen wrote: > >>> On Tue, Sep 08, 2015 at 03:25:25PM +0300, Roger Quadros wrote: > > >

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-09 Thread Roger Quadros
On 09/09/15 11:13, Peter Chen wrote: > On Wed, Sep 09, 2015 at 12:08:10PM +0300, Roger Quadros wrote: >> On 09/09/15 05:21, Peter Chen wrote: >>> On Tue, Sep 08, 2015 at 03:25:25PM +0300, Roger Quadros wrote: On 08/09/15 11:31, Peter Chen wrote: > On Mon, Sep 07, 2015 at

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-09 Thread Peter Chen
On Wed, Sep 09, 2015 at 12:08:10PM +0300, Roger Quadros wrote: > On 09/09/15 05:21, Peter Chen wrote: > > On Tue, Sep 08, 2015 at 03:25:25PM +0300, Roger Quadros wrote: > >> > >> > >> On 08/09/15 11:31, Peter Chen wrote: > >>> On Mon, Sep 07, 2015 at 01:23:01PM +0300, Roger Quadros wrote: >

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-09 Thread Roger Quadros
On 09/09/15 05:21, Peter Chen wrote: > On Tue, Sep 08, 2015 at 03:25:25PM +0300, Roger Quadros wrote: >> >> >> On 08/09/15 11:31, Peter Chen wrote: >>> On Mon, Sep 07, 2015 at 01:23:01PM +0300, Roger Quadros wrote: On 07/09/15 04:23, Peter Chen wrote: > On Mon, Aug 24, 2015 at 04:21:18PM

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-09 Thread Li Jun
On Mon, Sep 07, 2015 at 01:53:19PM +0300, Roger Quadros wrote: > On 07/09/15 10:40, Li Jun wrote: > > On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote: > >> The OTG core instantiates the OTG Finite State Machine > >> per OTG controller and manages starting/stopping the > >> host and

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-09 Thread Li Jun
On Mon, Sep 07, 2015 at 01:53:19PM +0300, Roger Quadros wrote: > On 07/09/15 10:40, Li Jun wrote: > > On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote: > >> The OTG core instantiates the OTG Finite State Machine > >> per OTG controller and manages starting/stopping the > >> host and

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-09 Thread Roger Quadros
On 09/09/15 05:21, Peter Chen wrote: > On Tue, Sep 08, 2015 at 03:25:25PM +0300, Roger Quadros wrote: >> >> >> On 08/09/15 11:31, Peter Chen wrote: >>> On Mon, Sep 07, 2015 at 01:23:01PM +0300, Roger Quadros wrote: On 07/09/15 04:23, Peter Chen wrote: > On Mon, Aug 24, 2015 at 04:21:18PM

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-09 Thread Roger Quadros
On 09/09/15 09:20, Li Jun wrote: > On Mon, Sep 07, 2015 at 01:53:19PM +0300, Roger Quadros wrote: >> On 07/09/15 10:40, Li Jun wrote: >>> On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote: The OTG core instantiates the OTG Finite State Machine per OTG controller and manages

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-09 Thread Roger Quadros
On 09/09/15 11:45, Peter Chen wrote: > On Wed, Sep 09, 2015 at 12:33:20PM +0300, Roger Quadros wrote: >> On 09/09/15 11:13, Peter Chen wrote: >>> On Wed, Sep 09, 2015 at 12:08:10PM +0300, Roger Quadros wrote: On 09/09/15 05:21, Peter Chen wrote: > On Tue, Sep 08, 2015 at 03:25:25PM +0300,

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-09 Thread Roger Quadros
(adding back folks in cc) On 08/09/15 20:35, Alan Stern wrote: > On Tue, 8 Sep 2015, Roger Quadros wrote: > What if there is another architecture like so? C: [Parent] | |

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-09 Thread Peter Chen
On Wed, Sep 09, 2015 at 12:33:20PM +0300, Roger Quadros wrote: > On 09/09/15 11:13, Peter Chen wrote: > > On Wed, Sep 09, 2015 at 12:08:10PM +0300, Roger Quadros wrote: > >> On 09/09/15 05:21, Peter Chen wrote: > >>> On Tue, Sep 08, 2015 at 03:25:25PM +0300, Roger Quadros wrote: > > >

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-09 Thread Peter Chen
On Wed, Sep 09, 2015 at 12:08:10PM +0300, Roger Quadros wrote: > On 09/09/15 05:21, Peter Chen wrote: > > On Tue, Sep 08, 2015 at 03:25:25PM +0300, Roger Quadros wrote: > >> > >> > >> On 08/09/15 11:31, Peter Chen wrote: > >>> On Mon, Sep 07, 2015 at 01:23:01PM +0300, Roger Quadros wrote: >

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-09 Thread Roger Quadros
On 09/09/15 11:13, Peter Chen wrote: > On Wed, Sep 09, 2015 at 12:08:10PM +0300, Roger Quadros wrote: >> On 09/09/15 05:21, Peter Chen wrote: >>> On Tue, Sep 08, 2015 at 03:25:25PM +0300, Roger Quadros wrote: On 08/09/15 11:31, Peter Chen wrote: > On Mon, Sep 07, 2015 at

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-09 Thread Alan Stern
On Wed, 9 Sep 2015, Roger Quadros wrote: > (adding back folks in cc) > > On 08/09/15 20:35, Alan Stern wrote: > > On Tue, 8 Sep 2015, Roger Quadros wrote: > > > What if there is another architecture like so? > > C: > [Parent] > | >

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-08 Thread Peter Chen
On Tue, Sep 08, 2015 at 03:25:25PM +0300, Roger Quadros wrote: > > > On 08/09/15 11:31, Peter Chen wrote: > > On Mon, Sep 07, 2015 at 01:23:01PM +0300, Roger Quadros wrote: > >> On 07/09/15 04:23, Peter Chen wrote: > >>> On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote: > + *

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-08 Thread Roger Quadros
Alan, On 08/09/15 17:34, Alan Stern wrote: > On Tue, 8 Sep 2015, Roger Quadros wrote: > >> On 08/09/15 11:31, Peter Chen wrote: >>> On Mon, Sep 07, 2015 at 01:23:01PM +0300, Roger Quadros wrote: On 07/09/15 04:23, Peter Chen wrote: > On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-08 Thread Alan Stern
On Tue, 8 Sep 2015, Roger Quadros wrote: > On 08/09/15 11:31, Peter Chen wrote: > > On Mon, Sep 07, 2015 at 01:23:01PM +0300, Roger Quadros wrote: > >> On 07/09/15 04:23, Peter Chen wrote: > >>> On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote: > + * This is used by the USB Host

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-08 Thread Roger Quadros
On 08/09/15 11:31, Peter Chen wrote: > On Mon, Sep 07, 2015 at 01:23:01PM +0300, Roger Quadros wrote: >> On 07/09/15 04:23, Peter Chen wrote: >>> On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote: + * This is used by the USB Host stack to register the Host controller + * to

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-08 Thread Peter Chen
On Mon, Sep 07, 2015 at 01:23:01PM +0300, Roger Quadros wrote: > On 07/09/15 04:23, Peter Chen wrote: > > On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote: > >> + * This is used by the USB Host stack to register the Host controller > >> + * to the OTG core. Host controller must not be

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-08 Thread Peter Chen
On Mon, Sep 07, 2015 at 01:23:01PM +0300, Roger Quadros wrote: > On 07/09/15 04:23, Peter Chen wrote: > > On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote: > >> + * This is used by the USB Host stack to register the Host controller > >> + * to the OTG core. Host controller must not be

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-08 Thread Roger Quadros
On 08/09/15 11:31, Peter Chen wrote: > On Mon, Sep 07, 2015 at 01:23:01PM +0300, Roger Quadros wrote: >> On 07/09/15 04:23, Peter Chen wrote: >>> On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote: + * This is used by the USB Host stack to register the Host controller + * to

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-08 Thread Alan Stern
On Tue, 8 Sep 2015, Roger Quadros wrote: > On 08/09/15 11:31, Peter Chen wrote: > > On Mon, Sep 07, 2015 at 01:23:01PM +0300, Roger Quadros wrote: > >> On 07/09/15 04:23, Peter Chen wrote: > >>> On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote: > + * This is used by the USB Host

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-08 Thread Peter Chen
On Tue, Sep 08, 2015 at 03:25:25PM +0300, Roger Quadros wrote: > > > On 08/09/15 11:31, Peter Chen wrote: > > On Mon, Sep 07, 2015 at 01:23:01PM +0300, Roger Quadros wrote: > >> On 07/09/15 04:23, Peter Chen wrote: > >>> On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote: > + *

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-08 Thread Roger Quadros
Alan, On 08/09/15 17:34, Alan Stern wrote: > On Tue, 8 Sep 2015, Roger Quadros wrote: > >> On 08/09/15 11:31, Peter Chen wrote: >>> On Mon, Sep 07, 2015 at 01:23:01PM +0300, Roger Quadros wrote: On 07/09/15 04:23, Peter Chen wrote: > On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-07 Thread Roger Quadros
On 07/09/15 10:40, Li Jun wrote: > On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote: >> The OTG core instantiates the OTG Finite State Machine >> per OTG controller and manages starting/stopping the >> host and gadget controllers based on the bus state. >> >> It provides APIs for the

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-07 Thread Roger Quadros
On 07/09/15 04:23, Peter Chen wrote: > On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote: >> + * This is used by the USB Host stack to register the Host controller >> + * to the OTG core. Host controller must not be started by the >> + * caller as it is left upto the OTG state machine

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-07 Thread Li Jun
On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote: > The OTG core instantiates the OTG Finite State Machine > per OTG controller and manages starting/stopping the > host and gadget controllers based on the bus state. > > It provides APIs for the following tasks > > - Registering an

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-07 Thread Li Jun
On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote: > The OTG core instantiates the OTG Finite State Machine > per OTG controller and manages starting/stopping the > host and gadget controllers based on the bus state. > > It provides APIs for the following tasks > > - Registering an

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-07 Thread Roger Quadros
On 07/09/15 10:40, Li Jun wrote: > On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote: >> The OTG core instantiates the OTG Finite State Machine >> per OTG controller and manages starting/stopping the >> host and gadget controllers based on the bus state. >> >> It provides APIs for the

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-07 Thread Roger Quadros
On 07/09/15 04:23, Peter Chen wrote: > On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote: >> + * This is used by the USB Host stack to register the Host controller >> + * to the OTG core. Host controller must not be started by the >> + * caller as it is left upto the OTG state machine

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-06 Thread Peter Chen
On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote: > + * This is used by the USB Host stack to register the Host controller > + * to the OTG core. Host controller must not be started by the > + * caller as it is left upto the OTG state machine to do so. > + * > + * Returns: 0 on

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-06 Thread Peter Chen
On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote: > + * This is used by the USB Host stack to register the Host controller > + * to the OTG core. Host controller must not be started by the > + * caller as it is left upto the OTG state machine to do so. > + * > + * Returns: 0 on

[PATCH v4 07/13] usb: otg: add OTG core

2015-08-24 Thread Roger Quadros
The OTG core instantiates the OTG Finite State Machine per OTG controller and manages starting/stopping the host and gadget controllers based on the bus state. It provides APIs for the following tasks - Registering an OTG capable controller - Registering Host and Gadget controllers to OTG core -

[PATCH v4 07/13] usb: otg: add OTG core

2015-08-24 Thread Roger Quadros
The OTG core instantiates the OTG Finite State Machine per OTG controller and manages starting/stopping the host and gadget controllers based on the bus state. It provides APIs for the following tasks - Registering an OTG capable controller - Registering Host and Gadget controllers to OTG core -