[alsa-devel] [PATCH 4/4] hda: thinkpad_helper: Add support for hid-lenovo LED control

Takashi Iwai tiwai at suse.de
Wed Sep 14 09:03:50 CEST 2016


On Wed, 14 Sep 2016 08:22:45 +0200,
Dennis Wassenberg wrote:
> 
> Hi Takashi,
> 
> at my first shot published to github I had an approach which makes thinkpad_acpi and hid-lenovo mutual exclusive (https://github.com/dwassenberg/linux/tree/development/hid-rmi). This approach has some issues. For example in case of thinkpad_acpi and hid-lenovo module is loaded (e.g. at Lenovo ThinkPad X1 Tablet) the symbol request to tpacpi_led_set is successful so the thinkpad_helper will decide in favor of thinkpad_acpi. So I need to add something which checks the return code of tpacpi_led_set. If -ENODEV is returned it can try hid-lenovo.
> 
> But the reason why I made thinkpad_acpi and hid-lenovo work in parallel was that if it is mutual exclusive there is no possibility to control LEDs of external Lenovo USB keyboards which are connected to a Thinkpad. Currently (including the other patches) there is only the X1 Tablet Cover LEDs which is controllable from external code. But the hid-lenovo driver is able to handle different Lenovo USB Keyboards.
> 
> - ThinkPad USB Keyboard with TrackPoint (tpkbd)
> - ThinkPad Compact Bluetooth Keyboard with TrackPoint (cptkbd)
> - ThinkPad Compact USB Keyboard with TrackPoint (cptkbd)
> - ThinkPad X1 Cover USB Keyboard with TrackPoint and Touchpad (tpx1cover)
> 
> These keyboards have these LEDs too. For some of these keyboards a LED control is implemented inside hid-lenovo too. If thinkpad_acpi and hid-lenovo is mutual exclusive it is impossible to let the thinkpad_helper control the LEDs of these external USB keyboards if they are connected to a thinkpad. I don't know if anyone will do this, but I don't want to take the possibility to do such thinks :)
> 
> So.. if there is the decision (from your side) that this should be mutual exclusive I will prepare a v2 which the mutual exclusive approach I described at the top.

OK, now understood.  But still make sure that it works even with one
of kconfigs is disabled.


thanks,

Takashi


More information about the Alsa-devel mailing list