Re: [PATCH] hid/i2c-hid: override HID descriptors for certain devices

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

 



On Thu, May 31, 2018 at 10:47 AM, Jiri Kosina <jikos@xxxxxxxxxx> wrote:
> On Wed, 30 May 2018, Dmitry Torokhov wrote:
>
>> > A particular touchpad (SIPODEV SP1064) refuses to supply the HID
>> > descriptors. This patch provides the framework for overriding these
>> > descriptors based on DMI data. It also includes the descriptors for
>> > said touchpad, as well as the DMI data for the 4 laptops known to
>> > use this device.
>>
>> I would love if we did not have to build these quirks into kernel.
>> Given that majority of HID devices are compiled as modules, can we try
>> using request_firmware("<vid>-<pid>.descr") and try to load descriptor
>> overrides from disk before during device initialization? That would
>> also allow dropping bunch of trivial HID drivers that contain trivial
>> descriptor fixups.
>
> Yeah, this has been on my TODO for years, but I never had time to actually
> implement that :/
>
> In case you have anyone asking the "I want to work on kernel, what should
> I do?", this might be one of the tasks.

Actually, I started to work on that for the Wacom devices a while
back. I still have code to generate the firmware files and to load
them. It seemed to be working great but the problem is that this
doesn't complies properly with the initramfs.
Let say your device needs a report descriptor override, but it is not
in the initramfs. When you boot, the kernel detects it and then tries
to load the "firmware". This fails, but the device is actually
"working" from a HID point of view so it is presented to user space.
Now the initial setup is done, we switched root, and we have the
firmware available. How can we tell the previously configured device
that it needs to re-probe itself and load the firmware?

This last question I couldn't answer. And we (the Linux Wacom
engineers and I) managed to convinced the Wacom firmware team to
provide a HID compliant firmware, so I dropped the ball.

For the Wacom devices, the solution I ended up doing was either not
having the wacom.ko driver in initramfs (let's assume you don't type
your lucks password with a tablet), or force the firmwares in the
initramfs, which could lead to potentially a lot of wasted space.

Cheers,
Benjamin

>
> Thanks,
>
> --
> Jiri Kosina
> SUSE Labs
>
--
To unsubscribe from this list: send the line "unsubscribe linux-input" 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 Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux