Here's 3 patches that make USB endpoints be "real" devices in sysfs,
instead of the hack of a "raw" kobject.  They are the first user of
another patch that I've made to the driver core that allows "struct
device" to work like "struct class_device" variables do, so that patch
is needed if you want to test this out.  It can be found at:
        
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/gregkh-01-driver/device-class.patch

I did this work in order to allow us to hook character device nodes up
to endpoints directly, no virtual filesystem would be needed (this
solves the permission problem that usbfs used to have before Kay fixed
it) and will be how usbfs2 is looking to work out.  Right now I'm just
using a fake major of 442 to see how well udev works with this (it
does), and the generation of the minor number is not correct (it causes
duplicates and huge gaps), but everything else should be the same.

I've also included a symlink from the current "epXX" directory to the
new "usbdevX.X_epXX" directory to keep any userspace tool from breaking
that happened to be looking at that directory (anyone know of one, or
can I just drop that?)

The name of the devices seems a bit long, but I couldn't think of a
better one right now, and am open for suggestions.  Also note that
/sys/class/usb_endpoint/ contains symlinks to all endpoints, and that
the class disappears when all devices go away from the system (instead
of the usbcore unregistering), which is a bit nicer.

I've broken it down into 3 patches:
        - first one moves endpoint functions into their own file
        - second one changes a parameter in the endpoint creation
          function
        - third one is all of the real work.

Comments?

thanks,

greg k-h


_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to