On Wed, Feb 03, 2010 at 02:31:55PM +0100, Martin Poupe wrote: > On 3.02.2010 14:05, Andreas Mohr wrote: >> On Wed, Feb 03, 2010 at 11:27:33AM +0100, Martin Poupe wrote: >> >>> Now I need to access the USB via sysfs, because not all Linux platforms >>> have usbfs available. I cannot open("/sys/bus/usb/devices/5-1", O_RDWR) >>> because this is a directory :-( What file in this directory (or >>> elsewhere) should be opened for ioctl() ? >>> >> Any specific reason not to use libusb instead of doing raw access? >> (ok, if we're talking about nuts-and-bolts embedded OTOH...) >> >> Andreas Mohr >> >> > Yes, some (embedded) platforms do not have libusb available. And moreover > libusb (version 1.0) still uses usbfs for opening the device. > It uses sysfs only to enumerate devices. Yes, and this is what you need to do as well. usbfs is still around, it's just not "mounted", you want the /dev/bus/usb/ files, which is still the usbfs interface. Look at how libusb does this for an example of what you can also do. Hope this helps, greg k-h -- 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