]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
usb, g_dnl: make possibility to fixup the device_desc board specific
authorHeiko Schocher <hs@denx.de>
Tue, 4 Jun 2013 09:19:50 +0000 (11:19 +0200)
committerMarek Vasut <marex@denx.de>
Sun, 30 Jun 2013 16:41:07 +0000 (18:41 +0200)
add a weak dummy function g_dnl_fixup to add the possibility to update
the device_desc board specific. Used on the upcoming siemens board
support, where idVendor and idProduct is stored in an eeprom.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
drivers/usb/gadget/g_dnl.c
include/g_dnl.h

index cc3f3449c97c85b2e4fad5ed46f3f55210d845fc..8a3777b6e0b2d8e09525b600084465f612c6bb28 100644 (file)
@@ -125,6 +125,12 @@ static int g_dnl_config_register(struct usb_composite_dev *cdev)
        return usb_add_config(cdev, &config);
 }
 
+__weak
+int g_dnl_bind_fixup(struct usb_device_descriptor *dev)
+{
+       return 0;
+}
+
 static int g_dnl_bind(struct usb_composite_dev *cdev)
 {
        struct usb_gadget *gadget = cdev->gadget;
@@ -147,6 +153,7 @@ static int g_dnl_bind(struct usb_composite_dev *cdev)
        g_dnl_string_defs[1].id = id;
        device_desc.iProduct = id;
 
+       g_dnl_bind_fixup(&device_desc);
        ret = g_dnl_config_register(cdev);
        if (ret)
                goto error;
index f47395f35d3133510093080033237ebf54db1aa6..f8affd8d91bd3bc031eff4728996abdbf333dd25 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
-
+int g_dnl_bind_fixup(struct usb_device_descriptor *);
 int g_dnl_register(const char *s);
 void g_dnl_unregister(void);