OSDN Git Service

HID: apple: Report Magic Keyboard 2021 with fingerprint reader battery over USB
authorJosé Expósito <jose.exposito89@gmail.com>
Tue, 8 Feb 2022 18:55:30 +0000 (19:55 +0100)
committerJiri Kosina <jkosina@suse.cz>
Wed, 16 Feb 2022 15:49:45 +0000 (16:49 +0100)
commitcbfcfbfc384890a062a5d0cc4792df094a6cc7a8
treedf8ba1b6d9a29bd30aa6f4b1b9976d24e789d397
parent8ae5c16c9d421d43f32f66d2308031f1bd3f9336
HID: apple: Report Magic Keyboard 2021 with fingerprint reader battery over USB

Like the Apple Magic Keyboard 2015, when connected over USB, the 2021
version with fingerprint reader registers 2 different interfaces. One of
them is used to report the battery level.

However, unlike when connected over Bluetooth, the battery level is not
reported automatically and it is required to fetch it manually.

Add the APPLE_RDESC_BATTERY quirk to fix the battery report descriptor
and manually fetch the battery level.

Tested with the ANSI variant of the keyboard with and without numpad.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-apple.c