linux gadget hid driver insert error
Hi All
I am building the HID Composite Driver from the link below http://lxr.free-electrons.com/source...et/hid.c?a=arm The module build successfully but when i insert the module using insmod i got the following error: insmod: error inserting './hid.ko': -1 Invalid parameters Anyone have any idea about how to fix this issue? |
It seems that there are some issues in the build due to which invalid parameters error came up.
Now the invalid parameters error is gone but getting following error: insmod: error inserting './g_hid.ko': -1 No such device Anyone have any idea to solve this issue??? |
Problem Solved.
step1: go to the link below. http://www.mjmwired.net/kernel/Docum...gadget_hid.txt step2: copy the following two structures from the above link and paste into hid.c hidg_func_descriptor platform_device step3: compile the hid module step4: load the module That's it. |
hi Ma1,
your solution seems did not work for me. I followed your steps, and it still failed with "insmod: error inserting './g_hid.ko': -1 Invalid module format" then, I found out the kernel that I am building is not the same version as the one I run the insmod command, so I rebuilt again. but this time, I got "insmod: error inserting './g_hid.ko': -1 No such device" what could I be wrong? can you help? also, both situations, I got message "drivers/usb/gadget/hid.c:159:31: warning: ‘my_hid’ defined but not used [-Wunused-variable]" from compiler, does this means the two structures added has not been used at all? Cheers, |
All times are GMT -5. The time now is 05:30 AM. |