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 3aec4416855e679c6e64c4f92428680def85d03f Mon Sep 17 00:00:00 2001
|
|
From: Aun-Ali Zaidi <admin@kodeit.net>
|
|
Date: Sun, 31 Jan 2021 02:26:18 -0600
|
|
Subject: [PATCH 9/9] HID: apple: Add support for MacBookPro16,1
|
|
keyboard/trackpad
|
|
|
|
This commit adds the necessary IDs and configuration for the MacBook Pro
|
|
(16-inch, 2019) [MacBookPro16,1 J152F iBridge2,14]
|
|
|
|
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 2585986250d3..e68fe6855d3f 100644
|
|
--- a/drivers/hid/hid-apple.c
|
|
+++ b/drivers/hid/hid-apple.c
|
|
@@ -745,6 +745,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_J230K),
|
|
.driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL },
|
|
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J152F),
|
|
+ .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 a113c30f3898..c15ed9687f97 100644
|
|
--- a/drivers/hid/hid-ids.h
|
|
+++ b/drivers/hid/hid-ids.h
|
|
@@ -172,6 +172,7 @@
|
|
#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 d9707ba949ee..62f85c976759 100644
|
|
--- a/drivers/hid/hid-quirks.c
|
|
+++ b/drivers/hid/hid-quirks.c
|
|
@@ -296,6 +296,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
|
{ 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) },
|
|
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J230K) },
|
|
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J152F) },
|
|
{ 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) },
|
|
@@ -937,6 +938,7 @@ static const struct hid_device_id hid_mouse_ignore_list[] = {
|
|
{ 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) },
|
|
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J230K) },
|
|
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J152F) },
|
|
{ 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 861afa9ac300..83f08e4b47d0 100644
|
|
--- a/drivers/input/mouse/bcm5974.c
|
|
+++ b/drivers/input/mouse/bcm5974.c
|
|
@@ -98,6 +98,8 @@
|
|
#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J223 0x027f
|
|
/* MacbookAir9,1 (2020) */
|
|
#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J230K 0x0280
|
|
+/* MacbookPro16,1 (2019)*/
|
|
+#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J152F 0x0340
|
|
|
|
#define BCM5974_DEVICE(prod) { \
|
|
.match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \
|
|
@@ -177,6 +179,8 @@ static const struct usb_device_id bcm5974_table[] = {
|
|
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRINGT2_J223),
|
|
/* MacbookAir9,1 */
|
|
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRINGT2_J230K),
|
|
+ /* MacbookPro16,1 */
|
|
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRINGT2_J152F),
|
|
/* Terminating entry */
|
|
{}
|
|
};
|
|
@@ -604,6 +608,19 @@ static const struct bcm5974_config bcm5974_config_table[] = {
|
|
{ SN_COORD, -170, 7685 },
|
|
{ SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
|
|
},
|
|
+ {
|
|
+ USB_DEVICE_ID_APPLE_WELLSPRINGT2_J152F,
|
|
+ 0,
|
|
+ 0,
|
|
+ HAS_INTEGRATED_BUTTON,
|
|
+ 0, sizeof(struct bt_data),
|
|
+ 0x83, DATAFORMAT(TYPE4),
|
|
+ { SN_PRESSURE, 0, 300 },
|
|
+ { SN_WIDTH, 0, 2048 },
|
|
+ { SN_COORD, -8546, 9918 },
|
|
+ { SN_COORD, -1789, 9835 },
|
|
+ { SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
|
|
+ },
|
|
{}
|
|
};
|
|
|
|
--
|
|
2.30.1
|
|
|