You've already forked linux-t2-patches
mirror of
https://github.com/t2linux/linux-t2-patches.git
synced 2026-04-30 13:52:11 -07:00
83 lines
4.1 KiB
Diff
83 lines
4.1 KiB
Diff
From 96ae78d70a21e7ba765daf870efc8577092d5ff0 Mon Sep 17 00:00:00 2001
|
|
From: Aditya Garg <gargaditya08@live.com>
|
|
Date: Tue, 18 Mar 2025 21:25:05 +0530
|
|
Subject: [PATCH 4/5] HID: apple: Add necessary IDs and support for replacement
|
|
trackpad on MacBookPro15,1
|
|
|
|
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.
|
|
|
|
Signed-off-by: Aditya Garg <gargaditya08@live.com>
|
|
---
|
|
drivers/hid/hid-apple.c | 4 ++++
|
|
drivers/hid/hid-ids.h | 17 +++++++++--------
|
|
drivers/hid/hid-quirks.c | 1 +
|
|
3 files changed, 14 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
|
|
index fdfbfe6ab..dd84a387e 100644
|
|
--- a/drivers/hid/hid-apple.c
|
|
+++ b/drivers/hid/hid-apple.c
|
|
@@ -523,6 +523,7 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
|
|
table = apple2021_fn_keys;
|
|
else if (hid->product == USB_DEVICE_ID_APPLE_WELLSPRINGT2_J132 ||
|
|
hid->product == USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680 ||
|
|
+ hid->product == USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680_ALT ||
|
|
hid->product == USB_DEVICE_ID_APPLE_WELLSPRINGT2_J213)
|
|
table = macbookpro_no_esc_fn_keys;
|
|
else if (hid->product == USB_DEVICE_ID_APPLE_WELLSPRINGT2_J214K ||
|
|
@@ -1191,6 +1192,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_IGNORE_MOUSE },
|
|
+ { 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_IGNORE_MOUSE },
|
|
{ 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_IGNORE_MOUSE },
|
|
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
|
index 192c09c27..f4b803c5b 100644
|
|
--- a/drivers/hid/hid-ids.h
|
|
+++ b/drivers/hid/hid-ids.h
|
|
@@ -170,14 +170,15 @@
|
|
#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
|
|
diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
|
|
index 2eb15a7ae..ecfb1c3a8 100644
|
|
--- a/drivers/hid/hid-quirks.c
|
|
+++ b/drivers/hid/hid-quirks.c
|
|
@@ -312,6 +312,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) },
|
|
--
|
|
2.43.0
|
|
|