On Tue, Jan 22, 2008 at 07:52:57PM +0000, Christian Schoenebeck wrote:
> Am Dienstag, 22. Januar 2008 16:27:33 schrieben Sie:
> > Hm, exactly how the usbfs2 endpoints are exported, right?  :)
> 
> I guess so, because what I'm trying to do is merely just to expose some of 
> the 
> device's (interrupt) endpoints as separate character device files under /dev. 
> The "real" communication is thus moved to a user space app / lib which 
> handles the control of the device with simple read() and write() calls to the 
> various characters device files.

Yep, definitely sounds like you want usbfs2.

> Works fine so for one endpoint, but as said, due to the limitation of   struct
> usb_interface   (being limited to just one minor per USB interface), I could
> not simply add another usb_register_dev() call to create further character
> devices for the other endpoints of same USB interface.

usbfs2 currently doesn't have a policy for which processes get to use
interfaces; it just lets anyone talk through the endpoint files.  However, this
will probably change before usbfs2 is merged into the kernel.  The kernel only
allows one kernel driver to use an interface, and that policy should probably
apply to userspace drivers too.  I've been playing around with the idea of
having one interface file in /dev that only one process can open before it can
use the endpoint files.  I haven't done much research into actually implementing
it, since I've been distracted by other things lately.

> > Have you looked at that code?  You might just need to hook up the needed
> > character operations, and add the async i/o stuff that Sarah is working on,
> > and you would be done.  Take a look at her posts in the archives for working
> > code and what is needed to be completed.
> 
> As you pointed me at it, I just checked out the respective git repository, but
> couldn't find it there. Do I have to update to a branch or something? Sorry
> for the question, but I never used git before, so that's what I used:
> 
>       git clone http://svcs.cs.pdx.edu/~sarah/usbfs2.git usbfs2

The usbfs2 code is in the file drivers/usb/core/endpoint_fops.c.  It currently
doesn't support interrupt endpoints, but feel free to support and send me a
patch.

Sarah Sharp
-
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to