Tree dumb questions from an occasional

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

 



First of all, please bear with me for writing this.

Should this appear email to be a criticism toward any of you,
be assured that this is not the intention. I'm
really grateful to all you guys, who keep improving the kernel
and allows us to use a free operating system.

My questions here below are basically along the lines of
"would it make sense to write this and that?". This is not
because I'd like someone else to do the work for me, but
because I really don't know whether it makes sense or not.
Should be wrong to make such type of questions without  
accompanying proofs of concept, then please ignore me, and
I'll go back into my cave.

Some background: I've recently bought a laser digital pointer
from HP. It connects through Bluetooth.
Since it did not work, I made a point to have it working,
even if I'm not a kernel developer, and do not plan to become a
kernel developer.
At the end, this turned out to be a two-line patch, adding
the HID_QUIRK_MULTI_INPUT for such device. Something that
would likely require less than 5 minutes 
of a not-so proficient kernel developer.

However, the process for me was much more cumbersome:
I had to navigate a lot o wrong or misleading documentation
in different forums, try to make sense of the kernel documentation,
understand what a HID descriptor is,
understand how to parse it, try to make sense of some 
unknown kernel code (mostly unsuccessfully), 
try with ebpf, try this and that... you get the idea.

Now, I'm writing because I _think_ I've learned something 
in the process, and perhaps it could be useful to share it.

Thus the questions:

1) do you think it would make sense to have some basic documentation
describing what a hid descriptor is, where to download the documents 
defining it (https://www.usb.org/ is linked from the docs, 
but this is not enough to get started, at least for someone like me), 
how to actually read it from the hardware, how to parse it... ? 
Very basic things, that, if I'm not wrong, are not currently 
covered by the kernel documentation, and that could allow 
someone else like me to get started more quickly?
If yes, I can try to write a skeleton for that, but I'm not sure
there will not be errors and/or omissions, thus it would likely need
to be fixed by someone more knowledgeable than me.

2) if I got it right, one can add a quirk like HID_QUIRK_MULTI_INPUT
while loading the usb_hid module, but not while loading the usb_generic
one (that turned out to be the module that manages my HP pointer), 
even if the statically defined quirks were moved into their own file. 
Would it make sense to add the possibility to
add quirks while loading hid_generic? Is this the right place for 
such code? If yes, I can try in my spare time to do this, 
even if I'm not sure I'll be able to get it right.

3) always if I get it right, currently it is not possible to inject quirks
using ebpf, but only to modify the HID descriptor. 
Is this correct? If yes, do you think it would be feasible and reasonable
to add such a  possibility? If yes, I can try in my spare time to do this, 
even if I'm not sure I'll be able to get it right.

Apologize again for this long email:
I understand it's full of good intentions but without any
significant contribution :(

Marco



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux