From: Grigorii Sokolik <g.sokol99@g-sokol.info>
To: linux-input@vger.kernel.org
Subject: Backport of 6.14-rc5 commit 2813e00dcd748cef47d2bffaa04071de93fddf00 to 6.13
Date: Tue, 4 Mar 2025 11:30:08 +0200 [thread overview]
Message-ID: <CADjZRiRRM1f9QU3Sy4e+n_sk_Sj2248MOaGSV65SpTbiZibzOA@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 366 bytes --]
Backporting the commit and supporting apple 0x0320 keyboard and alos
supporting new apple keyboard deviceID: 0x0321
Add Apple Magic Keyboard 2024 model (with USB-C port) device ID (0321)
to those recognized by the hid-apple driver. Keyboard is otherwise
compatible with the existing implementation for its earlier 2021 model.
--
Thanks!
Kind regards,
Grigorii!
[-- Attachment #1.2: Type: text/html, Size: 640 bytes --]
[-- Attachment #2: linux-patch --]
[-- Type: application/octet-stream, Size: 2733 bytes --]
diff --color -uprN linux-6.13.5-vanilla/drivers/hid/hid-apple.c linux-6.13.5/drivers/hid/hid-apple.c
--- linux-6.13.5-vanilla/drivers/hid/hid-apple.c 2025-03-04 10:04:32.252541483 +0200
+++ linux-6.13.5/drivers/hid/hid-apple.c 2025-03-04 11:15:44.449664215 +0200
@@ -474,6 +474,8 @@ static int hidinput_apple_event(struct h
hid->product == USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2015)
table = magic_keyboard_2015_fn_keys;
else if (hid->product == USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2021 ||
+ hid->product == USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024 ||
+ hid->product == USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024_V2 ||
hid->product == USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2021 ||
hid->product == USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2021)
table = apple2021_fn_keys;
@@ -1150,6 +1152,14 @@ static const struct hid_device_id apple_
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_RDESC_BATTERY },
{ HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2021),
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024),
+ .driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_RDESC_BATTERY },
+ { HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024),
+ .driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024_V2),
+ .driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_RDESC_BATTERY },
+ { HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024_V2),
+ .driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2021),
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_RDESC_BATTERY },
{ HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2021),
diff --color -uprN linux-6.13.5-vanilla/drivers/hid/hid-ids.h linux-6.13.5/drivers/hid/hid-ids.h
--- linux-6.13.5-vanilla/drivers/hid/hid-ids.h 2025-03-04 10:04:32.252541483 +0200
+++ linux-6.13.5/drivers/hid/hid-ids.h 2025-03-04 11:18:52.684093836 +0200
@@ -184,6 +184,8 @@
#define USB_DEVICE_ID_APPLE_IRCONTROL4 0x8242
#define USB_DEVICE_ID_APPLE_IRCONTROL5 0x8243
#define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2021 0x029c
+#define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024 0x0320
+#define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024_V2 0x0321
#define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2021 0x029a
#define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2021 0x029f
#define USB_DEVICE_ID_APPLE_TOUCHBAR_BACKLIGHT 0x8102
reply other threads:[~2025-03-04 9:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADjZRiRRM1f9QU3Sy4e+n_sk_Sj2248MOaGSV65SpTbiZibzOA@mail.gmail.com \
--to=g.sokol99@g-sokol.info \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).