]> asedeno.scripts.mit.edu Git - linux.git/commit
HID: lg-g15: Add support for the G510 keyboards' gaming keys
authorHans de Goede <hdegoede@redhat.com>
Wed, 28 Aug 2019 12:41:28 +0000 (14:41 +0200)
committerJiri Kosina <jkosina@suse.cz>
Thu, 3 Oct 2019 18:48:27 +0000 (20:48 +0200)
commitad4203f5a2435efef161516958f743982c9c2ee8
tree1c01327bba8c7295042a738babbea2123e0756f4
parentd5b5fc8c89525d5e6f44a85f40db458af938e330
HID: lg-g15: Add support for the G510 keyboards' gaming keys

Add support for the gaming and LCD menu keys on the G510 keyboard.

Note this commit does not add support for the keyboard and LCD backlight
and the status LEDs, this is done in a follow up commit.

Note the G510 generates 4 different input reports on its second
(Consumer Keys) interface:

-input report 1 is standard bootclass keyboard input report, mirroring
 normal keyboard interface
-input report 2 is consumer page keys
-input report 3 is gkeys, etc.
-input report 4 is LED status, single byte, bits:
 bit 2: kbd and LCD backlight is *off* when set, toggled by the light key
 bit 3: headphone mute LED
 bit 4: mic mute LED

Input-report 1 we ignore since this is a duplicate report from the first
interface, report 2 is handled by the regular hid-input code. In this
commit we add handling for input report 3.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-ids.h
drivers/hid/hid-lg-g15.c