blob: f32e00529c7807b902c271ece6e590f3484ab12b [file] [log] [blame]
From f6f54a58a1fcf591b773846864a58e0aab0c8d53 Mon Sep 17 00:00:00 2001
From: Benson Leung <bleung@chromium.org>
Date: Thu, 21 May 2020 15:37:33 -0700
Subject: [PATCH] CHROMIUM: HID: generic: Unquirk HID_QUIRK_INPUT_PER_APP for
the Logi K580
The split of one input per app resulted in the top row being split
off on its own input, which broke the way we remapped the top
row in Chrome.
Let's unquirk this back for now until our userspace is set to handle
the K580 Kata keyboard better (b/157067041).
Signed-off-by: Benson Leung <[email protected]>
BUG=b:155811784
TEST=Attach Logi K580 keyboard via bluetooth. Check using evtest
that a single "Logi K580 Keyboard" input event appears.
Change-Id: I87f3983bc127af817f9a72f5eb8a4c055b3acd31
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2213049
Reviewed-by: Sean O'Brien <seobrien@chromium.org>
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Tested-by: Benson Leung <bleung@google.com>
Commit-Queue: Benson Leung <bleung@google.com>
Auto-Submit: Benson Leung <bleung@chromium.org>
[rebase510(groeck): Context conflicts in drivers/hid/hid-ids.h]
Signed-off-by: Guenter Roeck <groeck@chromium.org>
---
drivers/hid/hid-generic.c | 7 ++++++-
drivers/hid/hid-ids.h | 1 +
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/hid-generic.c b/drivers/hid/hid-generic.c
index f9db991d3c5a2c734698ac85af36ae15eb505f71..c0187b5194c70b16f139dd1f70683f91b5be90e1 100644
--- a/drivers/hid/hid-generic.c
+++ b/drivers/hid/hid-generic.c
@@ -20,6 +20,7 @@
#include <asm/byteorder.h>
#include <linux/hid.h>
+#include "hid-ids.h"
static struct hid_driver hid_generic;
@@ -58,7 +59,11 @@ static int hid_generic_probe(struct hid_device *hdev,
{
int ret;
- hdev->quirks |= HID_QUIRK_INPUT_PER_APP;
+ /* FIXME(b/157067041) : Remove this unquirk for the Logi K580. */
+ if (hdev->vendor != USB_VENDOR_ID_LOGITECH ||
+ hdev->product != USB_DEVICE_ID_LOGITECH_K580_CHROME ||
+ hdev->bus != BUS_BLUETOOTH)
+ hdev->quirks |= HID_QUIRK_INPUT_PER_APP;
ret = hid_parse(hdev);
if (ret)
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 0e6fadafabb1f01cc1330d4dee36517dc5e2c0fd..e12c0b15f2eddebdecfff75a7facd5db5188e1d2 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -826,6 +826,7 @@
#define USB_DEVICE_ID_LOGITECH_AUDIOHUB 0x0a0e
#define USB_DEVICE_ID_LOGITECH_T651 0xb00c
#define USB_DEVICE_ID_LOGITECH_DINOVO_EDGE_KBD 0xb309
+#define USB_DEVICE_ID_LOGITECH_K580_CHROME 0xb35d
#define USB_DEVICE_ID_LOGITECH_CASA_TOUCHPAD 0xbb00
#define USB_DEVICE_ID_LOGITECH_C007 0xc007
#define USB_DEVICE_ID_LOGITECH_C077 0xc077
--
2.45.1.288.g0e0cd299f1-goog