On Wed, Oct 04, 2006 at 02:27:02PM -0400, Alan Stern wrote: > On Wed, 4 Oct 2006, Greg KH wrote: > > > On Wed, Oct 04, 2006 at 11:03:51AM -0400, Alan Stern wrote: > > > Greg: > > > > > > I'm working on a patch to create class devices for USB hubs. Is this a > > > reasonable thing to do? We already have classes for USB hosts and > > > general > > > USB devices. > > > > If you think you want an easy way to find all usb hubs in the system, > > and /sys/bus/usb/drivers/hub/ isn't good enough for it, then yes, a > > class could work. > > In this case I guess a class isn't really needed.
I agree. > > > I don't have a good understanding of how class devices are supposed to > > > work and what they should be used for. Nor is it clear which of the > > > class-device APIs should be used. > > > > Traditionally classes are used for when we want to export a device node > > for the device. In this case, like usb hosts, that isn't. > > Would it be fair to say that classes are also appropriate when you want to > have a single API available for a bunch of different drivers? The way all > Ethernet drivers share a single API? Yes, that is a very good description. > The usb_host class doesn't fit either of these paradigms. Perhaps it > shouldn't exist? It doesn't seem to contain anything very useful, other > than the list of all the hosts. They could just as well be replaced by > symlinks. Yeah, I want to drop the usb_host class stuff. I started to mess with it a few weeks ago, but it's a mess, and I got side-tracked by more important things, like breaking every single input driver :) I'll get back to it soon and post a proposed patch. > (Note that ehci-hcd and ohci-hcd both store their debugging attributes > under /sys/class/usb_host. This appears to be a holdover from the past; > obviously those files belong in debugfs.) Agreed. thanks, greg k-h ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
