]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
HID: apple: Add necessary IDs and support for replacement trackpad on MacBookPro15,1
authorAditya Garg <gargaditya08@live.com>
Mon, 19 May 2025 12:16:23 +0000 (17:46 +0530)
committerJiri Kosina <jkosina@suse.com>
Tue, 10 Jun 2025 19:22:30 +0000 (21:22 +0200)
Some third party trackpad replacements like that of HAWSON may have a
different PID than the stock trackpad. This commit adds one such trackpad
to hid-apple, available for MacBookPro15,1

Signed-off-by: Aditya Garg <gargaditya08@live.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/hid-apple.c
drivers/hid/hid-ids.h
drivers/hid/hid-quirks.c

index 155d514fb4c593d8b2a251a0af01f3e4e3ed5df4..b8b99eb01a35c4c9d3f0887992e51afbe48c4711 100644 (file)
@@ -499,6 +499,7 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
                case USB_DEVICE_ID_APPLE_WELLSPRINGT2_J132:
                case USB_DEVICE_ID_APPLE_WELLSPRINGT2_J213:
                case USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680:
+               case USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680_ALT:
                        table = macbookpro_no_esc_fn_keys;
                        break;
                case USB_DEVICE_ID_APPLE_WELLSPRINGT2_J152F:
@@ -1159,6 +1160,9 @@ static const struct hid_device_id apple_devices[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680),
                .driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL | APPLE_ISO_TILDE_QUIRK |
                        APPLE_DISABLE_FKEYS },
+       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680_ALT),
+               .driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL | APPLE_ISO_TILDE_QUIRK |
+                       APPLE_DISABLE_FKEYS },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J213),
                .driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL | APPLE_ISO_TILDE_QUIRK |
                        APPLE_DISABLE_FKEYS },
index dd0a48595d57bf8ea952d707a480d690cdc4fe1b..041b80bf3c9959c8c013efaeefa4f149d2d8155d 100644 (file)
 #define USB_DEVICE_ID_APPLE_WELLSPRING9_ANSI   0x0272
 #define USB_DEVICE_ID_APPLE_WELLSPRING9_ISO            0x0273
 #define USB_DEVICE_ID_APPLE_WELLSPRING9_JIS            0x0274
-#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K 0x027a
-#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J132  0x027b
-#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680  0x027c
-#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J213  0x027d
-#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J214K 0x027e
-#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J223  0x027f
-#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J230K 0x0280
-#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J152F 0x0340
+#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K         0x027a
+#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J132          0x027b
+#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680          0x027c
+#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680_ALT      0x0278
+#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J213          0x027d
+#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J214K         0x027e
+#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J223          0x027f
+#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J230K         0x0280
+#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J152F         0x0340
 #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY   0x030a
 #define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY    0x030b
 #define USB_DEVICE_ID_APPLE_IRCONTROL  0x8240
index 8a418f4878e2d41f35c48c566932415acfb1a0a1..1fba3b7f6d41b5f2f93b09d149f123ea0b44d2ed 100644 (file)
@@ -314,6 +314,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J132) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680_ALT) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J213) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J214K) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J223) },