public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lukasz Majewski <l.majewski@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 3/3] usb: gadget: fastboot: Set the Serial Number for Fastboot Gadget
Date: Tue, 24 Feb 2015 11:28:57 +0100	[thread overview]
Message-ID: <20150224112857.4521adfa@amdc2363> (raw)
In-Reply-To: <1423809223-24219-3-git-send-email-dileep.katta@linaro.org>

Hi Dileep,

> Configure the serial number using the serial# environment variable
> during the fastboot bind.
> 
> This enables "fastboot devices" to return the serial number for
> the attached devices.
> 
> Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
> ---
>  drivers/usb/gadget/f_fastboot.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/usb/gadget/f_fastboot.c
> b/drivers/usb/gadget/f_fastboot.c index 0d53a61..d114c07 100644
> --- a/drivers/usb/gadget/f_fastboot.c
> +++ b/drivers/usb/gadget/f_fastboot.c
> @@ -136,6 +136,7 @@ static int fastboot_bind(struct usb_configuration
> *c, struct usb_function *f) int id;
>  	struct usb_gadget *gadget = c->cdev->gadget;
>  	struct f_fastboot *f_fb = func_to_fastboot(f);
> +	const char *s;
>  
>  	/* DYNAMIC interface numbers assignments */
>  	id = usb_interface_id(c, f);
> @@ -161,6 +162,10 @@ static int fastboot_bind(struct
> usb_configuration *c, struct usb_function *f) 
>  	hs_ep_out.bEndpointAddress = fs_ep_out.bEndpointAddress;
>  
> +	s = getenv("serial#");
> +	if (s)
> +		g_dnl_set_serialnumber((char *)s);
> +
>  	return 0;
>  }
>  

Applied to u-boot-dfu branch.

Thanks for the patch!

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

  parent reply	other threads:[~2015-02-24 10:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-13  6:33 [U-Boot] [PATCH v1 1/3] fastboot: OUT transaction length must be aligned to wMaxPacketSize Dileep Katta
2015-02-13  6:33 ` [U-Boot] [PATCH v1 2/3] fastboot: Correct fastboot_fail and fastboot_okay strings Dileep Katta
2015-02-13 19:19   ` Steve Rae
2015-02-24 10:28   ` Lukasz Majewski
2015-02-13  6:33 ` [U-Boot] [PATCH v1 3/3] usb: gadget: fastboot: Set the Serial Number for Fastboot Gadget Dileep Katta
2015-02-13 19:32   ` Steve Rae
2015-02-24 10:28   ` Lukasz Majewski [this message]
2015-02-13 17:59 ` [U-Boot] [PATCH v2 1/3] fastboot: OUT transaction length must be aligned to wMaxPacketSize Dileep Katta
2015-02-13 19:53   ` Stegmaier, Angela
2015-02-16 20:32     ` [U-Boot] [PATCH v3 " Dileep Katta
2015-02-24 10:28       ` Lukasz Majewski
2016-03-10 23:46         ` [U-Boot] Anyone else having issues with "fastboot flash" - because of this change? Steve Rae
2016-03-11  0:11           ` Steve Rae
2015-02-13 19:53   ` [U-Boot] [PATCH v2 1/3] fastboot: OUT transaction length must be aligned to wMaxPacketSize Steve Rae

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=20150224112857.4521adfa@amdc2363 \
    --to=l.majewski@samsung.com \
    --cc=u-boot@lists.denx.de \
    /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