- diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
- index d29cd13..abf28ed 100644
- --- a/drivers/usb/core/usb.c
- +++ b/drivers/usb/core/usb.c
- @@ -464,6 +464,24 @@ int usb_new_device(struct usb_device *dev)
- dev->descriptor->idVendor, "%04x");
- dev_add_param_uint32_fixed(&dev->dev, "idProduct",
- dev->descriptor->idProduct, "%04x");
- + /*
- + * These are used so barebox scripts can idenfify specific
- + * devices by their class
- + */
- + dev_add_param_uint32_fixed(&dev->dev, "bDeviceClass",
- + (uint32_t)dev->descriptor->bDeviceClass, "%x");
- + dev_add_param_uint32_fixed(&dev->dev, "bDeviceSubClass",
- + (uint32_t)dev->descriptor->bDeviceSubClass, "%x");
- + dev_add_param_uint32_fixed(&dev->dev, "bDeviceProtocol",
- + (uint32_t)dev->descriptor->bDeviceProtocol, "%x");
- + //dev_add_param_uint32_fixed(&dev->dev, "bInterfaceClass",
- + // dev->descriptor->bInterfaceClass, "%02x");
- + //dev_add_param_uint32_fixed(&dev->dev, "bInterfaceSubClass",
- + // dev->descriptor->bInterfaceSubClass, "%02x");
- + //dev_add_param_uint32_fixed(&dev->dev, "bInterfaceProtocol",
- + // dev->descriptor->bInterfaceSubClass, "%02x");
- +
- +
- list_add_tail(&dev->list, &usb_device_list);
- dev_count++;
barebox: Publish USB *Class* device values as barebox hush shell variables
Posted by Anonymous on Mon 25th Nov 2019 14:11
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.