Skip to content
Snippets Groups Projects
Commit 537cd072 authored by Dileep Katta's avatar Dileep Katta Committed by Marek Vasut
Browse files

usb: gadget: fastboot: Set the Serial Number for Fastboot Gadget


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: default avatarDileep Katta <dileep.katta@linaro.org>
Acked-by: default avatarSteve Rae <srae@broadcom.com>
Reviewed-by: default avatarLukasz Majewski <l.majewski@samsung.com>
parent e8742071
No related branches found
No related tags found
No related merge requests found
...@@ -137,6 +137,7 @@ static int fastboot_bind(struct usb_configuration *c, struct usb_function *f) ...@@ -137,6 +137,7 @@ static int fastboot_bind(struct usb_configuration *c, struct usb_function *f)
int id; int id;
struct usb_gadget *gadget = c->cdev->gadget; struct usb_gadget *gadget = c->cdev->gadget;
struct f_fastboot *f_fb = func_to_fastboot(f); struct f_fastboot *f_fb = func_to_fastboot(f);
const char *s;
/* DYNAMIC interface numbers assignments */ /* DYNAMIC interface numbers assignments */
id = usb_interface_id(c, f); id = usb_interface_id(c, f);
...@@ -162,6 +163,10 @@ static int fastboot_bind(struct usb_configuration *c, struct usb_function *f) ...@@ -162,6 +163,10 @@ static int fastboot_bind(struct usb_configuration *c, struct usb_function *f)
hs_ep_out.bEndpointAddress = fs_ep_out.bEndpointAddress; hs_ep_out.bEndpointAddress = fs_ep_out.bEndpointAddress;
s = getenv("serial#");
if (s)
g_dnl_set_serialnumber((char *)s);
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment