Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I have a device which is using the usbhid driver.

I noticed a module folder inside the driver with a file name quirks.Can anyone tell me the correct way to edit this file and the values it can take?

    root@raspberrypi:/sys/bus/hid/drivers/generic-usb/module/parameters# dir
    ignoreled  mousepoll  quirks

By default it only contains the following value.

    (null),(null),(null),(null)
share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

I believe you can find a list by module with modinfo

$ modinfo usbhid
...
parm:           quirks:Add/modify USB HID quirks by specifying  quirks=vendorID:productID:quirks where vendorID, productID, and quirks are all in 0x-prefixed hex (array of charp)

And you can give them as parameters while loading a module.

$ sudo modprobe -v usbhid "quirks=0xDEAD:0xBEEF:0x55AA"

I believe you can also just write these into a sysfs file at runtime in some cases. Seems the usbhid is read-only on my (desktop) system, though.

$ echo "0xDEAD:0xBEEF:0x55AA" | sudo tee -a /sys/module/usbhid/parameters/quirks
tee: /sys/module/usbhid/parameters/quirks: Permission denied

I haven't looked into these more and you'll need to find the actual values from somewhere (source, LXR?), but maybe that's a start.

share|improve this answer
    
The answer was really helpful.I was able to add quirks to the driver using the first method.Thanks. –  SteveIrwin Nov 9 '12 at 7:29
    
Good to hear :) –  XTL Nov 9 '12 at 7:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.