Skip to content

Commit 86b05bb

Browse files
dev-soragotoJiri Kosina
authored andcommitted
HID: magicmouse: Update device name for Apple Magic Trackpad
Updated the device name for Apple Magic Trackpad USB-C when connected via Bluetooth. This change ensures the correct recognition of the 2024 USB-C trackpad and improves user experience. Signed-off-by: Qingyan Li <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 8ade5e0 commit 86b05bb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/hid/hid-magicmouse.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ module_param(report_undeciphered, bool, 0644);
5252
MODULE_PARM_DESC(report_undeciphered, "Report undeciphered multi-touch state field using a MSC_RAW event");
5353

5454
#define TRACKPAD2_2021_BT_VERSION 0x110
55+
#define TRACKPAD_2024_BT_VERSION 0x314
5556

5657
#define TRACKPAD_REPORT_ID 0x28
5758
#define TRACKPAD2_USB_REPORT_ID 0x02
@@ -567,9 +568,12 @@ static int magicmouse_setup_input(struct input_dev *input, struct hid_device *hd
567568
*/
568569
if (hdev->vendor == BT_VENDOR_ID_APPLE) {
569570
if (input->id.version == TRACKPAD2_2021_BT_VERSION)
571+
input->name = "Apple Inc. Magic Trackpad 2021";
572+
else if (input->id.version == TRACKPAD_2024_BT_VERSION) {
573+
input->name = "Apple Inc. Magic Trackpad USB-C";
574+
} else {
570575
input->name = "Apple Inc. Magic Trackpad";
571-
else
572-
input->name = "Apple Inc. Magic Trackpad 2";
576+
}
573577
} else { /* USB_VENDOR_ID_APPLE */
574578
input->name = hdev->name;
575579
}

0 commit comments

Comments
 (0)