On Thu, 10 Jun 2010, Amit Nagal wrote: > Hi , > > > i am working on linux usb host side . > > the interfacing usb device supports 2 usb configurations . > > default is 1) mass storage . > > other is 2) vendor specific configuration . > > if we connect such device to usb host , > > is it possible to have the following : > > 1) usb core queries device for total no of configurations supported . > > and then instead of selecting the first default mass storage > configuration from the device , > > usb core notifies some user space program regarding usb > configurations available > > and depending upon user input to user space program , > > mass storage configuration or the vendor specific configuration is > selected from user space . > > how we can select on the fly from user space program the desired usb > configuration from a multi > > configuration usb device . what user space interface we can use . and > what modifications > > need to be done in usb core . A program can select configuration N by writing to the appropriate file in sysfs. For example: echo N >/sys/bus/usb/devices/.../bConfigurationValue where "..." is the path for the device you want to set. No modifications to usbcore are needed. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html