]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/hid/hid-input.c
HID: input: rework HID_QUIRK_MULTI_INPUT
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Fri, 25 Nov 2016 13:27:21 +0000 (14:27 +0100)
committerJiri Kosina <jkosina@suse.cz>
Mon, 28 Nov 2016 13:39:47 +0000 (14:39 +0100)
commit72d19459d7919f966594576bb042d15a451f27ea
tree57f4aacfa8709eb1f37dff82d51f49d82aae3363
parent5cc5084dd9afa2f9bf953b0217bdb1b7c2158be1
HID: input: rework HID_QUIRK_MULTI_INPUT

The purpose of HID_QUIRK_MULTI_INPUT is to have an input device per
report id. This is useful when the HID device presents several HID
collections of different device types.

The current implementation of hid-input creates one input node per id per
type (input or output). This is problematic for the LEDs of a keyboard as
they are often set through an output report. The current code creates
one input node with all the keyboard keys, and one other with only the
LEDs.

To solve this, we use a two-passes way:
- first, we initialize all input nodes and associate one per report id
- then, we register all the input nodes

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-input.c
include/linux/hid.h