diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2013-01-21 21:09:48 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-01-23 08:56:56 +0100 |
commit | 1846900948161f7f2e15304d15961cc540d45040 (patch) | |
tree | 36cbf6dc65f23bb4d6970b43eb9a4d75d910ee2f /drivers/usb/core | |
parent | fba91e5e6eedb5b227814bb2ae091d7c49ee15ae (diff) | |
download | barebox-1846900948161f7f2e15304d15961cc540d45040.tar.gz barebox-1846900948161f7f2e15304d15961cc540d45040.tar.xz |
usb: add parameters info on usb device
iManufacturer = 0
iProduct = 1
iSerialNumber = 0
Manufacturer =
Product = OHCI Root Hub
SerialNumber =
idVendor = 0000
idProduct = 0000
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/usb.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 9dc931bdc6..a813be5ca4 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -300,6 +300,7 @@ static int usb_new_device(struct usb_device *dev) int port = -1; struct usb_device *parent = dev->parent; unsigned short portstatus; + char str[16]; buf = dma_alloc(USB_BUFSIZ); @@ -438,6 +439,19 @@ static int usb_new_device(struct usb_device *dev) print_usb_device(dev); register_device(&dev->dev); + sprintf(str, "%d", dev->descriptor->iManufacturer); + dev_add_param_fixed(&dev->dev, "iManufacturer", str); + sprintf(str, "%d", dev->descriptor->iProduct); + dev_add_param_fixed(&dev->dev, "iProduct", str); + sprintf(str, "%d", dev->descriptor->iSerialNumber); + dev_add_param_fixed(&dev->dev, "iSerialNumber", str); + dev_add_param_fixed(&dev->dev, "Manufacturer", dev->mf); + dev_add_param_fixed(&dev->dev, "Product", dev->prod); + dev_add_param_fixed(&dev->dev, "SerialNumber", dev->serial); + sprintf(str, "%04x", le16_to_cpu(dev->descriptor->idVendor)); + dev_add_param_fixed(&dev->dev, "idVendor", str); + sprintf(str, "%04x", le16_to_cpu(dev->descriptor->idProduct)); + dev_add_param_fixed(&dev->dev, "idProduct", str); list_add_tail(&dev->list, &usb_device_list); err = 0; |