lkml.org 
[lkml]   [2015]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 2/9] usb: gadget: add usb_gadget_start/stop()
On Thu, Mar 19, 2015 at 12:14:39PM +0200, Roger Quadros wrote:
> On 19/03/15 05:30, Peter Chen wrote:
> > On Wed, Mar 18, 2015 at 03:55:56PM +0200, Roger Quadros wrote:
> >> The OTG state machine needs a mechanism to start and
> >> stop the gadget controller. Add usb_gadget_start()
> >> and usb_gadget_stop().
> >>
> >> Signed-off-by: Roger Quadros <rogerq@ti.com>
> >> ---
> >> drivers/usb/gadget/udc/udc-core.c | 166 +++++++++++++++++++++++++++++++++++---
> >> include/linux/usb/gadget.h | 3 +
> >> 2 files changed, 158 insertions(+), 11 deletions(-)
> >>
> >> diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.c
> >> index 5a81cb0..69b4123 100644
> >> --- a/drivers/usb/gadget/udc/udc-core.c
> >> +++ b/drivers/usb/gadget/udc/udc-core.c
> >> @@ -35,6 +35,8 @@
> >> * @dev - the child device to the actual controller
> >> * @gadget - the gadget. For use by the class code
> >> * @list - for use by the udc class driver
> >> + * @running - udc is running
> >
> > 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 based on this flag.
>

why this can not be known by check the otg fsm state? i.e. if the device in
b_peripheral or a_peripheral state, udc should had started, isn't it?

Li Jun
> cheers,
> -roger
>
> >
> > Peter
> >> + * @softconnect - sysfs softconnect says OK to connect
> >> *
> >
>


\
 
 \ /
  Last update: 2015-03-19 15:41    [W:2.176 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site