mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Ladislav Michl <ladis@linux-mips.org>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] usbgadget: autostart: add DFU support
Date: Fri, 26 Oct 2018 13:31:56 +0200	[thread overview]
Message-ID: <20181026113156.ldj7twmzwd2deaxi@pengutronix.de> (raw)
In-Reply-To: <20181026111047.GA4216@lenoch>

On Fri, Oct 26, 2018 at 01:10:47PM +0200, Ladislav Michl wrote:
> 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@linux-mips.org>
> > > ---
> > >  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)?

include/usb/gadget-multi.h perhaps? Not a perfect match, but in the end
that's what the function does: create a USB multi device.

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

To be honest I always use acm and never found out how the generic serial
works. It may have bitrotted over time, but for me it never worked.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

  reply	other threads:[~2018-10-26 11:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-25 22:37 Ladislav Michl
2018-10-26 10:19 ` Sascha Hauer
2018-10-26 11:10   ` Ladislav Michl
2018-10-26 11:31     ` Sascha Hauer [this message]
2018-10-26 13:54       ` Ladislav Michl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181026113156.ldj7twmzwd2deaxi@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=ladis@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox