Re: Out of tree HID driver

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

 



Hi everyone,

On 02/15/2012 12:23 AM, Nikolai Kondrashov wrote:
I'm trying to make a DKMS package with the HID drivers I've implemented, to
make it easier for the users to install them before a kernel releases with
them appears in their distributions.

I've managed to build and install them easily, and they get loaded upon
device insertion, but are not otherwise used, probably because the devices
are not in hid-core.c hid_have_special_driver array.

I'm sorry, I'm not proficient in the kernel internals and wasn't able to
understand quickly how to solve this. Is there a way for an out-of-tree
module to be used instead of the generic driver? If not, could it be
implemented?

After a bit of research I'm probably able to answer my own question:

It is not possible and it is not simple to implement properly either.

The ultimate problem is that the HID bus has "generic-usb" module, which
matches and claims any device, except listed in hid_have_special_driver.
There is no way to ensure that this matching happens after a module is
loaded, because it is loaded asynchronously. Thus, the module itself cannot
affect it.

The only solution I see for now is to add an array parameter to the "hid"
driver listing devices which have special drivers. And have the bus matching
function use that along with the static array. I'll be doing a patch which
does that.

There is one problem with this solution, though. To have it working
automatically upon DKMS package installation I'll have to add "hid" driver
options to modprobe config with MODULES_CONF. Since, AFAIK, there is no way
to merge options, this may conflict with the setup done by other packages.

Sincerely,
Nick
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux