diff options
author | Sean O'Brien <seobrien@chromium.org> | 2020-09-09 15:03:04 -0700 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2020-09-30 22:44:26 +0200 |
commit | 14c9c014babedc6098bf4cd83c622997867bc0df (patch) | |
tree | 46971e93b820a8f56783e09bfea4beb1ab2a9018 /drivers/hid/hid-core.c | |
parent | fc3abb53250a90ba2150eebd182137c136f4d25a (diff) |
HID: add vivaldi HID driver
Add vivaldi HID driver. This driver allows us to read and report the top
row layout of keyboards which provide a vendor-defined (Google) HID
usage.
Signed-off-by: Sean O'Brien <seobrien@chromium.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-core.c')
-rw-r--r-- | drivers/hid/hid-core.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index d2ecc9c45255..6dbd09254c44 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -814,6 +814,13 @@ static void hid_scan_collection(struct hid_parser *parser, unsigned type) if ((parser->global.usage_page << 16) >= HID_UP_MSVENDOR) parser->scan_flags |= HID_SCAN_FLAG_VENDOR_SPECIFIC; + + if ((parser->global.usage_page << 16) == HID_UP_GOOGLEVENDOR) + for (i = 0; i < parser->local.usage_index; i++) + if (parser->local.usage[i] == + (HID_UP_GOOGLEVENDOR | 0x0001)) + parser->device->group = + HID_GROUP_VIVALDI; } static int hid_scan_main(struct hid_parser *parser, struct hid_item *item) |