Re: [PATCH v3] HID: autoload hid-multitouch as needed
From: Henrik Rydberg
Date: Fri Mar 30 2012 - 13:40:49 EST
> When the generic hid parsing of the report descriptors in hid-core
> detects that the device contains the field ContactID, the device should
> be handled by hid-multitouch, and hid-core should release it.
> This patch implements a temporary fix for hid-core to automatically
> call the loading of hid-multitouch. A better solution would involve
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@xxxxxxx>
This reply contains an alternative approach involving userspace, but
first, two comments on this patch:
* It seems request_module_nowait() can be used instead of
* Cold plug fails when hid is loaded in absence of disks.
Rather than wait for the userland solution to appear, please find
enclosed five patches attempting to resolve the problem. Both
cold-plugged and hot-plugged devices seems to work. No extra udev
rules are needed. On this machine, everything seems to work as
intended. I run with the hid module builtin, and no initrd.
The approach is based on two things:
* Parse the hid descriptors before adding the device
* Modify the modalias to include a hid subclass matching the
kernel drivers, here exemplified with hid-multitouch.
The patches apply directly on top of 3.3, so it should be
fairly easy to try them out.