Re: [PATCH] usbgadget: autostart: add DFU support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 26, 2018 at 12:19:11PM +0200, Sascha Hauer wrote:
> Hi Ladis,
> 
> On Fri, Oct 26, 2018 at 12:37:19AM +0200, Ladislav Michl wrote:
> > Use global variable dfu_function to autostart DFU. As similar code
> > is used to start multifunction gadget using command, move common
> > code to common/usbgadget.c and consolidate it.
> > 
> > Signed-off-by: Ladislav Michl <ladis@xxxxxxxxxxxxxx>
> > ---
> >  This is a draft, comments welcome. Getting 
> >  Cannot set parameter otg.mode: No such device
> 
> I just sent a fix for this.

Thanks, tested, added.

> >  but that's same as before this patch. Documentation is probably
> >  also worth updating...
> 
> Indeed.

Will add prepatch to document bbu then.

> > diff --git a/commands/usbgadget.c b/commands/usbgadget.c
> > index a1744cbe1..416b2acfc 100644
> > --- a/commands/usbgadget.c
> > +++ b/commands/usbgadget.c
> > @@ -30,14 +30,18 @@
> >  #include <usb/dfu.h>
> >  #include <usb/gadget-multi.h>
> >  
> > +int usbgadget_register(bool dfu_set, const char *dfu_opts,
> > +		       bool fastboot_set, const char *fastboot_opts,
> > +		       bool create_serial, bool is_acm, bool export_bbu);
> > +
> 
> This should get a prototype somewhere in include/, but that's probably
> due to the draft status of this patch.

Any idea where would it fit? Or just create new file (which seems overkill
to me)?

> Otherwise looks fine to me.

usbgadget takes -s switch to create serial gadget and -a to create acm.
However I fail to see how is creating former done.

	ladis

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux