ChangeSet 1.823.3.16, 2002/11/14 11:25:24-08:00, [EMAIL PROTECTED]
[PATCH] usb sysfs shows bNumConfigurations
This patch shows how many configurations a device has,
which will be important for eventual user mode tools
that manage configurations.
diff -Nru a/drivers/usb/core/driverfs.c b/drivers/usb/core/driverfs.c
--- a/drivers/usb/core/driverfs.c Thu Nov 14 14:12:16 2002
+++ b/drivers/usb/core/driverfs.c Thu Nov 14 14:12:16 2002
@@ -148,23 +148,31 @@
usb_descriptor_attr (bDeviceClass, "%02x\n")
usb_descriptor_attr (bDeviceSubClass, "%02x\n")
usb_descriptor_attr (bDeviceProtocol, "%02x\n")
+usb_descriptor_attr (bNumConfigurations, "%d\n")
void usb_create_driverfs_dev_files (struct usb_device *udev)
{
struct device *dev = &udev->dev;
+ /* current configuration's attributes */
device_create_file (dev, &dev_attr_bNumInterfaces);
device_create_file (dev, &dev_attr_bConfigurationValue);
device_create_file (dev, &dev_attr_bmAttributes);
device_create_file (dev, &dev_attr_bMaxPower);
+
+ /* device attributes */
device_create_file (dev, &dev_attr_idVendor);
device_create_file (dev, &dev_attr_idProduct);
device_create_file (dev, &dev_attr_bcdDevice);
device_create_file (dev, &dev_attr_bDeviceClass);
device_create_file (dev, &dev_attr_bDeviceSubClass);
device_create_file (dev, &dev_attr_bDeviceProtocol);
+ device_create_file (dev, &dev_attr_bNumConfigurations);
+
+ /* speed varies depending on how you connect the device */
device_create_file (dev, &dev_attr_speed);
+ // FIXME iff there are other speed configs, show how many
if (udev->descriptor.iManufacturer)
device_create_file (dev, &dev_attr_manufacturer);
-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing
your web site with SSL, click here to get a FREE TRIAL of a Thawte
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel