From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH 4/4] hda: thinkpad_helper: Add support for hid-lenovo LED control Date: Wed, 14 Sep 2016 09:03:50 +0200 Message-ID: References: <91729b41-7537-b506-6980-94b9938c8305@secunet.com> <6d21581c-cbc6-f148-77fd-2b468335f481@secunet.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <6d21581c-cbc6-f148-77fd-2b468335f481@secunet.com> Sender: linux-sound-owner@vger.kernel.org To: Dennis Wassenberg Cc: linux-input@vger.kernel.org, linux-sound@vger.kernel.org, alsa-devel@alsa-project.org, lukas@wunner.de, Benjamin Tissoires , Andrew Duggan , perex@perex.cz, david.henningsson@canonical.com, vinod.koul@intel.com, hui.wang@canonical.com, rafael.j.wysocki@intel.com, jikos@kernel.org List-Id: linux-input@vger.kernel.org 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Date: Wed, 14 Sep 2016 07:03:50 +0000 Subject: Re: [PATCH 4/4] hda: thinkpad_helper: Add support for hid-lenovo LED control Message-Id: List-Id: References: <91729b41-7537-b506-6980-94b9938c8305@secunet.com> <6d21581c-cbc6-f148-77fd-2b468335f481@secunet.com> In-Reply-To: <6d21581c-cbc6-f148-77fd-2b468335f481@secunet.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Dennis Wassenberg Cc: linux-input@vger.kernel.org, linux-sound@vger.kernel.org, alsa-devel@alsa-project.org, lukas@wunner.de, Benjamin Tissoires , Andrew Duggan , perex@perex.cz, david.henningsson@canonical.com, vinod.koul@intel.com, hui.wang@canonical.com, rafael.j.wysocki@intel.com, jikos@kernel.org 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