Skip to content

Commit 0cd3be5

Browse files
alexhenrieJiri Kosina
authored andcommitted
HID: apple: Add support for the 2021 Magic Keyboard
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
1 parent 371a9dc commit 0cd3be5

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

drivers/hid/hid-apple.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,10 @@ static const struct hid_device_id apple_devices[] = {
627627
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
628628
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY),
629629
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
630+
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2021),
631+
.driver_data = APPLE_HAS_FN },
632+
{ HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2021),
633+
.driver_data = APPLE_HAS_FN },
630634

631635
{ }
632636
};

drivers/hid/hid-ids.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@
174174
#define USB_DEVICE_ID_APPLE_IRCONTROL3 0x8241
175175
#define USB_DEVICE_ID_APPLE_IRCONTROL4 0x8242
176176
#define USB_DEVICE_ID_APPLE_IRCONTROL5 0x8243
177+
#define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2021 0x029c
177178

178179
#define USB_VENDOR_ID_ASUS 0x0486
179180
#define USB_DEVICE_ID_ASUS_T91MT 0x0185

drivers/hid/hid-quirks.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
302302
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2015) },
303303
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
304304
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
305+
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2021) },
305306
#endif
306307
#if IS_ENABLED(CONFIG_HID_APPLEIR)
307308
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL) },

0 commit comments

Comments
 (0)