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
111 lines
4.8 KiB
Diff
111 lines
4.8 KiB
Diff
From 3c0c9c386f44263d0003e0cc148cff10a61f5a37 Mon Sep 17 00:00:00 2001
|
|
From: Aun-Ali Zaidi <admin@kodeit.net>
|
|
Date: Sun, 31 Jan 2021 01:56:59 -0600
|
|
Subject: [PATCH 5/8] HID: apple: Add support for MacBookPro15,4
|
|
keyboard/trackpad
|
|
|
|
This commit adds the necessary IDs and configuration for the MacBook Pro
|
|
(13-inch, 2019, Two Thunderbolt 3 ports) [MacBookPro15,4 J213 iBridge2,10]
|
|
|
|
This model uses the APPLE_BACKLIGHT_CTL quirk to expose keyboard
|
|
backlight controls.
|
|
|
|
Signed-off-by: Aun-Ali Zaidi <admin@kodeit.net>
|
|
---
|
|
drivers/hid/hid-apple.c | 2 ++
|
|
drivers/hid/hid-ids.h | 1 +
|
|
drivers/hid/hid-quirks.c | 2 ++
|
|
drivers/input/mouse/bcm5974.c | 17 +++++++++++++++++
|
|
4 files changed, 22 insertions(+)
|
|
|
|
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
|
|
index bf8dfca762a7..11bfc6b16778 100644
|
|
--- a/drivers/hid/hid-apple.c
|
|
+++ b/drivers/hid/hid-apple.c
|
|
@@ -735,6 +735,8 @@ static const struct hid_device_id apple_devices[] = {
|
|
.driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL },
|
|
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680),
|
|
.driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL },
|
|
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J213),
|
|
+ .driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL },
|
|
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI),
|
|
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
|
|
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO),
|
|
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
|
index c5340b03a56a..1e28f1f54de8 100644
|
|
--- a/drivers/hid/hid-ids.h
|
|
+++ b/drivers/hid/hid-ids.h
|
|
@@ -168,6 +168,7 @@
|
|
#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_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 32419a34a64d..ee698d275427 100644
|
|
--- a/drivers/hid/hid-quirks.c
|
|
+++ b/drivers/hid/hid-quirks.c
|
|
@@ -292,6 +292,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_J213) },
|
|
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) },
|
|
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) },
|
|
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) },
|
|
@@ -929,6 +930,7 @@ static const struct hid_device_id hid_mouse_ignore_list[] = {
|
|
{ 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_J213) },
|
|
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
|
|
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
|
|
{ }
|
|
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
|
|
index e7280b3c1a08..3964f58fb870 100644
|
|
--- a/drivers/input/mouse/bcm5974.c
|
|
+++ b/drivers/input/mouse/bcm5974.c
|
|
@@ -90,6 +90,8 @@
|
|
#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J132 0x027b
|
|
/* MacbookPro15,1 (2018) */
|
|
#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680 0x027c
|
|
+/* MacbookPro15,4 (2019) */
|
|
+#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J213 0x027d
|
|
|
|
#define BCM5974_DEVICE(prod) { \
|
|
.match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \
|
|
@@ -161,6 +163,8 @@ static const struct usb_device_id bcm5974_table[] = {
|
|
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRINGT2_J132),
|
|
/* MacbookPro15,1 */
|
|
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680),
|
|
+ /* MacbookPro15,4 */
|
|
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRINGT2_J213),
|
|
/* Terminating entry */
|
|
{}
|
|
};
|
|
@@ -536,6 +540,19 @@ static const struct bcm5974_config bcm5974_config_table[] = {
|
|
{ SN_COORD, -1768, 7685 },
|
|
{ SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
|
|
},
|
|
+ {
|
|
+ USB_DEVICE_ID_APPLE_WELLSPRINGT2_J213,
|
|
+ 0,
|
|
+ 0,
|
|
+ HAS_INTEGRATED_BUTTON,
|
|
+ 0, sizeof(struct bt_data),
|
|
+ 0x83, DATAFORMAT(TYPE4),
|
|
+ { SN_PRESSURE, 0, 300 },
|
|
+ { SN_WIDTH, 0, 2048 },
|
|
+ { SN_COORD, -6243, 6749 },
|
|
+ { SN_COORD, -170, 7685 },
|
|
+ { SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
|
|
+ },
|
|
{}
|
|
};
|
|
|
|
--
|
|
2.30.0
|
|
|