From: Brian N. <br...@tw...> - 2005-05-23 04:15:35
|
Charles Lepple wrote: >On 5/22/05, Brian Nelson <br...@tw...> wrote: > > >>The problem I'm having is the usb_claim_interface call fails because >>it's already claimed by the usbhid driver. I can disconnect it from the >>driver and the code works fine, but that's not what I want to do, >>because I want to maintain the joystick functionality that I already have. >> >> > >Unfortunately, while the kernel provides a "detach driver" call, it >does not offer a corresponding "reattach driver" call. > >There are a couple of hooks in the kernel HID driver to handle odd >devices, but your situation might require a nontrivial patch. > >The other option is to "fly blind" and just issue your command without >claiming the interface. The kernel should queue your control message >such that it will not be mixed up with other control message/response >pairs from the HID driver, but there are no guarantees with that >method. > > > By "flying blind," are you saying I should try just calling usb_control_msg without calling usb_claim_interface first? I think I've done that, and usb_control_msg just returns an error. If you're not talking about that (perhaps something outside of libusb?), can you give me a pointer in the right direction? Thanks! -Brian |