On Wed, 30 Jun 2010 22:02:00 +0800 Xiaofan Chen <xiaofanc@xxxxxxxxx> wrote: > On Wed, Jun 30, 2010 at 9:13 PM, Antonio Ospite > <ospite@xxxxxxxxxxxxxxxxx> wrote: > > > > One of the advantages in the usb case is that you do not have to > > _detach_ the kernel driver bound to the device in order to set/get > > raw hid reports. With libusb this is needed. > > > > To me this is not that much an advantage. Actually libusb-1.0 > has the API to re-attach the kernel driver under Linux. And we make > use of this in the new libusb-1.0 example program xusb. > http://libusb.sourceforge.net/api-1.0/group__dev.html#ga9de769d3aeb45a07f5559c8a0597cbcc > http://git.libusb.org/?p=libusb-pbatard.git;a=blob;f=examples/xusb.c;h=e260153aa50234f1c994db521969b7f0e84aebb6;hb=HEAD > AFAICS you are actually _detaching_ and _reattaching_ the driver later in this case, with hidraw you can interleave raw reports with normal operation from the current driver. Think to an input device to which you'd like to set/get a certain feature report for some reason, but that is already registered by evdev; if you use this libusb mechanism the evdev system will see the device disconnected and reconnected, with hidraw you just send the report "transparently" wrt. other subsystems. Regards, Antonio -- Antonio Ospite http://ao2.it PGP public key ID: 0x4553B001 A: Because it messes up the order in which people normally read text. See http://en.wikipedia.org/wiki/Posting_style Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?
Attachment:
pgpiWDoQ8S58N.pgp
Description: PGP signature