diff mbox

HID: asus: only support backlight when it's not driven by WMI

Message ID CAMz_NCr-3taeHeZ3NF2LYXrMGf25gWgL+dzdO=Ca=Bxug2EbCw@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mustafa Kuscu Jan. 12, 2018, 7:33 p.m. UTC
On Tue, Jan 9, 2018 at 10:58 PM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Tue, Jan 9, 2018 at 9:41 PM, Daniel Drake <drake@endlessm.com> wrote:
>> On Tue, Jan 9, 2018 at 1:32 PM, Andy Shevchenko
>> <andy.shevchenko@gmail.com> wrote:
>>> Imagine someone who on possession of laptop where it's not needed
>>> having old kernel configuration.
>>> Building new kernel with old configuration will bring a regression.
>>>
>>> Selection is also not a solution since we don't need all crap in
>>> kernel because of some particular case.
>>>
>>> So, NO.
>>
>> If I can't use depends nor select, then what options are left? What
>> alternative solutions do you have in mind?
>
> If you would able to move code under corresponding WMI driver, make it
> use any means of autodetection (it looks like you found a way via
> checking return code of method call) and
> then rely on distributions that they enable necessary modules
> (HID_ASUS, ASUS_WMI or alike).
>
> --
> With Best Regards,
> Andy Shevchenko
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


Hi,

It is interesting that the backlight buttons did not work for you. I
think your keyboard (0b05:1837)is a
USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD2.
I also have a ROG laptop (GL553VD) whose keyboard (0b05:1854) is being
identified as USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD1. Its keyboard
backlight shortcuts are enabled only after applying the following
patch. I am wondering why this harmless one liner did not find its way
into the modules tree. It's difficult to apply the patch to every keep
up with the latest. Maybe other ASUS people confirm this and help
pushing it further..
Kind Regards...

Signed-off-by: Mustafa C Kuscu <mustafakuscu@gmail.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Daniel Drake Jan. 15, 2018, 8:33 p.m. UTC | #1
Hi Mustafa,
On Fri, Jan 12, 2018 at 1:33 PM, Mustafa Kuscu <mustafakuscu@gmail.com> wrote:

>      { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
> -        USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD1) },
> +        USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD1), QUIRK_USE_KBD_BACKLIGHT },

This change is already included in the latest version of Linux so I
assume you are just running an old version.

Andy, still waiting for any more feedback on the issue detailed in
this thread once you have a chance.

Thanks
Daniel
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Andy Shevchenko Jan. 26, 2018, 9:47 a.m. UTC | #2
On Mon, Jan 15, 2018 at 10:33 PM, Daniel Drake <drake@endlessm.com> wrote:
> On Fri, Jan 12, 2018 at 1:33 PM, Mustafa Kuscu <mustafakuscu@gmail.com> wrote:

> Andy, still waiting for any more feedback on the issue detailed in
> this thread once you have a chance.

As I said before I don't like code duplication and even more I don't
like functionality duplication.
So, check what can we re-use from asus-wmi.c and adopt it accordingly.
diff mbox

Patch

diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index a4a3c38bc145..39068eddc03c 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
@@ -593,7 +593,7 @@  static const struct hid_device_id asus_devices[] = {
     { HID_I2C_DEVICE(USB_VENDOR_ID_ASUSTEK,
         USB_DEVICE_ID_ASUSTEK_I2C_TOUCHPAD), I2C_TOUCHPAD_QUIRKS },
     { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
-        USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD1) },
+        USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD1), QUIRK_USE_KBD_BACKLIGHT },
     { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
         USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD2), QUIRK_USE_KBD_BACKLIGHT },
     { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,