On Sun, 8 Jan 2006, NIIBE Yutaka wrote: > For my own experiment, I hacked linux/drivers/usb/core/hub.c so that > it exports a variable with sysfs to control port power. This > experiment succeeded, I could control AC power by changing the > variable of sysfs. (Actually, I found that many USB hubs don't > support control of port power, even if chips support the feature. I > had to buy new one, that's Elecom U2H-G4S.) > > I think that controling port power is quite useful feature. It would > be better to have some character device, say, /dev/usb/hub0 or > something, and to control port power through this character device. > > Any thoughts?
This sounds like a good idea to me. However I'm not so sure about the character device approach. There already is a device file for each hub, and the hub driver supports an ioctl to retrieve information about which device is attached to which port. It's obsolete, and sysfs is easier to use and regarded as better overall. Would you like to post your patch so we can see it? Alan Stern ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel