[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Which interface: sysfs, proc, devfs?


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 _at_ kroah.com> 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 _at_ vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


この情報があなたの探していたものかどうか選択してください。
yes/まさにこれだ!   no/違うなぁ   part/一部見つかった   try/これで試してみる

あなたが探していた情報はどのようなことか、ご自由に記入下さい。特に「まさにこれだ!」と言う場合は記入をお願いします。
例:「複数のマシンからCATV経由でipmasqueradeを利用してWebを参照したい場合の設定について」
Follow-Ups: References: