Re: [PATCH V4] usb: remove unnecessary CONFIG_PM dependency from USB_OTG

2015-12-01 Thread Li Jun
many will > have whatever special HW which, likely, doesn't even work with mainline > to validate a change. > > Please, make sure to fix that design so that HNP *always* goes through > the proper code path. If you have devices which would prevent HNP > because their class driver

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-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

Re: [PATCH v4 13/13] usb: otg: Add dual-role device (DRD) support

2015-09-07 Thread Li Jun
On Mon, Aug 24, 2015 at 04:21:24PM +0300, Roger Quadros wrote: > DRD mode is a reduced functionality OTG mode. In this mode > we don't support SRP, HNP and dynamic role-swap. > > In DRD operation, the controller mode (Host or Peripheral) > is decided based on the ID pin status. Once a cable plug (

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 OT

Re: [PATCH v2 0/3] Introduce usb charger framework to deal with the usb gadget power negotation

2015-08-17 Thread Li Jun
On Mon, Aug 17, 2015 at 02:02:08PM +0800, Baolin Wang wrote: > On 17 August 2015 at 09:15, Li Jun wrote: > > On Fri, Aug 14, 2015 at 07:04:56PM +0800, Baolin Wang wrote: > >> On 14 August 2015 at 16:55, Li Jun wrote: > >> > Hi Baolin, > >> > >

Re: [PATCH v2 0/3] Introduce usb charger framework to deal with the usb gadget power negotation

2015-08-16 Thread Li Jun
On Fri, Aug 14, 2015 at 07:04:56PM +0800, Baolin Wang wrote: > On 14 August 2015 at 16:55, Li Jun wrote: > > Hi Baolin, > > > > On Fri, Aug 14, 2015 at 05:47:43PM +0800, Baolin Wang wrote: > >> Currently the Linux kernel does not provide any standard integration o

Re: [PATCH v2 0/3] Introduce usb charger framework to deal with the usb gadget power negotation

2015-08-14 Thread Li Jun
d this in their kernels > or USB gadget devices based on Linux (such as mobile phones) may not behave > as they should. > > Providing a standard framework for doing this in the kernel. > Why not add power supply class support into this? Li Jun -- To unsubscribe from this list: se

Re: [PATCH v3 07/11] usb: otg: add OTG core

2015-07-21 Thread Li Jun
Hi, [...] > >> + otg_timer_init(A_WAIT_ENUM, otgd, set_tmout, TB_SRP_FAIL, NULL); > > > > 2 timers are missing: B_DATA_PLS, B_SSEND_SRP. > > Those 2 are not used by usb-otg-fsm.c. We can add it when usb-otg-fsm.c is > updated. > ok. > > > >> +} [...] > >> + > >> +/** > >> + * OTG FSM op

Re: [PATCH v3 10/11] usb: otg: Add dual-role device (DRD) support

2015-07-17 Thread Li Jun
On Wed, Jul 08, 2015 at 01:19:36PM +0300, Roger Quadros wrote: [...] > struct otg_fsm *usb_otg_register(struct device *parent_dev, > - struct otg_fsm_ops *fsm_ops) > + struct otg_fsm_ops *fsm_ops, > + bool drd

Re: [PATCH v3 10/11] usb: otg: Add dual-role device (DRD) support

2015-07-17 Thread Li Jun
Hi, On Wed, Jul 08, 2015 at 01:19:36PM +0300, Roger Quadros wrote: > DRD mode is a reduced functionality OTG mode. In this mode > we don't support SRP, HNP and dynamic role-swap. > > In DRD operation, the controller mode (Host or Peripheral) > is decided based on the ID pin status. Once a cable p

Re: [PATCH v3 07/11] usb: otg: add OTG core

2015-07-17 Thread Li Jun
help > @@ -75,15 +75,6 @@ config USB_OTG_BLACKLIST_HUB > and software costs by not supporting external hubs. So > are "Embedded Hosts" that don't offer OTG support. > > -config USB_OTG_FSM > - tristate "USB 2.0 OTG FSM implementation" >

Re: [PATCH v3 00/11] USB: OTG/DRD Core functionality

2015-07-13 Thread Li Jun
On Mon, Jul 13, 2015 at 01:24:05PM +0300, Roger Quadros wrote: > Hi, > > On 10/07/15 10:58, Li Jun wrote: > > On Wed, Jul 08, 2015 at 01:19:26PM +0300, Roger Quadros wrote: > >> Hi, > >> > >> This series centralizes OTG/Dual-role functionality in the

Re: [PATCH v3 00/11] USB: OTG/DRD Core functionality

2015-07-10 Thread Li Jun
use are already > in v4.2 Do you have any plan to implement OTG(HNP) on some of your platforms based on this OTG core? Li Jun > > http://thread.gmane.org/gmane.linux.kernel/1923161 > > DWC3 controller and platform related patches are sent separately. > > Changelog: -- To

Re: [PATCH v3 02/11] usb: otg-fsm: support multiple instances

2015-07-10 Thread Li Jun
On Wed, Jul 08, 2015 at 01:19:28PM +0300, Roger Quadros wrote: > Move the state_changed variable into struct otg_fsm > so that we can support multiple instances. > I am not sure if multiple instances may happen since OTG protocol requires only one OTG port can be equipped on OTG device

Re: [RFC][PATCH 3/9] usb: otg: add OTG core

2015-03-19 Thread Li Jun
On Thu, Mar 19, 2015 at 12:30:46PM +0200, Roger Quadros wrote: > On 19/03/15 10:26, Li Jun wrote: > > On Wed, Mar 18, 2015 at 03:55:57PM +0200, Roger Quadros wrote: > >> The OTG core instantiates the OTG Finite State Machine > >> per OTG controller and manages starting

Re: [RFC][PATCH 2/9] usb: gadget: add usb_gadget_start/stop()

2015-03-19 Thread Li Jun
ng > > > > Doesn't OTG FSM should know it? > > Not really, as the gadget driver might not have been loaded yet or userspace > might > have disabled softconnect when the OTG FSM wants UDC to start. > > So only UDC knows if it has really started or not bas

Re: [RFC][PATCH 3/9] usb: otg: add OTG core

2015-03-19 Thread Li Jun
UM_OTG_FSM_TIMERS]; > + > + bool fsm_running; > + bool gadget_can_start; /* OTG FSM says gadget can start */ > + bool host_can_start;/* OTG FSM says host can start */ Do not understand above 2 *_can_start flags from the patch, which are set only when you reall