Re: Which interface: sysfs, proc, devfs?

From: Greg KH
Date: Sun Feb 01 2004 - 16:35:59 EST


On Sun, Feb 01, 2004 at 09:57:21PM +0100, Jonas Diemer wrote:
> On Thu, 29 Jan 2004 15:02:50 -0800
> Greg KH <greg@xxxxxxxxx> wrote:
>
> > What about not writing a kernel driver at all and just using
> > libusb/usbfs? Any reason you have to have a kernel driver for your
> > device?
>
>
> Well, I have just looked into libusb 0.1.x... I would like to have
> asynchronous (non-blocking) access to my device, which libusb doesn't
> currently support.

You mean "submit a urb and be notified when it was completed?" I
thought libusb supported that with signals.

> Also I don't like the way libusb finds devices - manually scanning all
> busses doesn't seem very handy.

What other way can a userspace library do this? It doesn't take very
long at all, what is the problem with this?

> Thus I will probably go for a kernel module, using sysfs to interface
> with the user. Thanks for all the help anyways-

Remember that sysfs is "1 value per file". If that works for your
device, then I suggest you look at the usbled driver, as that is a tiny
usb driver that only uses sysfs. Nothing like a 4kb kernel driver :)

Good luck,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/