From 9c34660ee6d5f7a79c1519d7a865ffba9bf70e0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nimish=20G=C3=A5tam?= Date: Sun, 25 Jun 2023 12:44:24 +0200 Subject: HID: input: Fix Apple Magic Trackpad 1 Bluetooth disconnect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When connecting the Trackpad 1 via any bluetooth adapter, the device disconnects whenever the battery level is queried. It reconnects again after a few seconds, but it's an incredibly jarring experience since it will just cut out in the middle of mouse operations. This patch ignores querying the battery and avoids disconnects. This bug is reported here: - https://bugzilla.kernel.org/show_bug.cgi?id=204589 - https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1834085 It looks like a similar approach (disabling battery checking) was also suggested for the Apple Magic Mouse before a custom driver was created: https://bugzilla.kernel.org/show_bug.cgi?id=103631 Signed-off-by: Nimish Gåtam Signed-off-by: Jiri Kosina --- drivers/hid/hid-input.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/hid') diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 851ee86eff32..96659a7fb463 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -358,6 +358,9 @@ static const struct hid_device_id hid_battery_quirks[] = { { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI), HID_BATTERY_QUIRK_PERCENT | HID_BATTERY_QUIRK_FEATURE }, + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, + USB_DEVICE_ID_APPLE_MAGICTRACKPAD), + HID_BATTERY_QUIRK_IGNORE }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084), HID_BATTERY_QUIRK_IGNORE }, -- cgit v1.2.3 From c4444d8749f696384947192b602718fa310c1caf Mon Sep 17 00:00:00 2001 From: Nils Tonnaett Date: Tue, 15 Aug 2023 13:19:59 -0700 Subject: HID: apple: Add "Hailuck" to the list of non-apple keyboards Powzan keyboards KB750 and KB770 identify as "Hailuck Co.,Ltd USB Keyboard". Adding "Hailuck" to the list of non-apple keyboards fixes function keys for these models. Signed-off-by: Nils Tonnaett Reviewed-by: Rahul Rameshbabu --- drivers/hid/hid-apple.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/hid') diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c index d7b932925730..3ca45975c686 100644 --- a/drivers/hid/hid-apple.c +++ b/drivers/hid/hid-apple.c @@ -343,7 +343,8 @@ static const struct apple_non_apple_keyboard non_apple_keyboards[] = { { "SONiX USB DEVICE" }, { "Keychron" }, { "AONE" }, - { "GANSS" } + { "GANSS" }, + { "Hailuck" }, }; static bool apple_is_non_apple_keyboard(struct hid_device *hdev) -- cgit v1.2.3