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
5.17
This commit is contained in:
+24
-22
@@ -1,22 +1,22 @@
|
||||
From a6bf93712831ea518fcd342c3720b34f96afcd78 Mon Sep 17 00:00:00 2001
|
||||
From 9018eacbe623b2c3535da37035e5f22d3d70b6ce Mon Sep 17 00:00:00 2001
|
||||
From: Paul Pawlowski <paul@mrarm.io>
|
||||
Date: Sat, 30 Jan 2021 23:42:14 -0600
|
||||
Subject: [PATCH 1/9] HID: apple: Add support for keyboard backlight on
|
||||
supported models
|
||||
Date: Thu, 3 Feb 2022 12:21:13 +0000
|
||||
Subject: HID: apple: Add support for keyboard backlight on certain T2 Macs.
|
||||
|
||||
This commit introduces the requisite plumbing for supporting keyboard
|
||||
This patch introduces the requisite plumbing for supporting keyboard
|
||||
backlight on T2-attached, USB exposed models. The quirk mechanism was
|
||||
used to reuse the existing hid-apple driver.
|
||||
|
||||
Devices that support this feature will be added in subsequent patches.
|
||||
|
||||
Signed-off-by: Paul Pawlowski <paul@mrarm.io>
|
||||
Signed-off-by: Aun-Ali Zaidi <admin@kodeit.net>
|
||||
Signed-off-by: Aditya Garg <gargaditya08@live.com>
|
||||
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
||||
---
|
||||
drivers/hid/hid-apple.c | 124 ++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 124 insertions(+)
|
||||
|
||||
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
|
||||
index 6b8f0d004d34..e03a621bc741 100644
|
||||
index 7dc89dc6b..5c5991741 100644
|
||||
--- a/drivers/hid/hid-apple.c
|
||||
+++ b/drivers/hid/hid-apple.c
|
||||
@@ -7,6 +7,7 @@
|
||||
@@ -27,15 +27,15 @@ index 6b8f0d004d34..e03a621bc741 100644
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -30,6 +31,7 @@
|
||||
#define APPLE_INVERT_HWHEEL 0x0040
|
||||
/* 0x0080 reserved, was: APPLE_IGNORE_HIDINPUT */
|
||||
#define APPLE_NUMLOCK_EMULATION 0x0100
|
||||
+#define APPLE_BACKLIGHT_CTL 0x0200
|
||||
@@ -33,6 +34,7 @@
|
||||
/* BIT(7) reserved, was: APPLE_IGNORE_HIDINPUT */
|
||||
#define APPLE_NUMLOCK_EMULATION BIT(8)
|
||||
#define APPLE_RDESC_BATTERY BIT(9)
|
||||
+#define APPLE_BACKLIGHT_CTL BIT(10)
|
||||
|
||||
#define APPLE_FLAG_FKEY 0x01
|
||||
|
||||
@@ -57,11 +59,18 @@ MODULE_PARM_DESC(swap_fn_leftctrl, "Swap the Fn and left Control keys. "
|
||||
@@ -61,6 +63,12 @@ MODULE_PARM_DESC(swap_fn_leftctrl, "Swap the Fn and left Control keys. "
|
||||
"(For people who want to keep PC keyboard muscle memory. "
|
||||
"[0] = as-is, Mac layout, 1 = swapped, PC layout)");
|
||||
|
||||
@@ -46,15 +46,17 @@ index 6b8f0d004d34..e03a621bc741 100644
|
||||
+};
|
||||
+
|
||||
struct apple_sc {
|
||||
struct hid_device *hdev;
|
||||
unsigned long quirks;
|
||||
unsigned int fn_on;
|
||||
@@ -68,6 +76,7 @@ struct apple_sc {
|
||||
unsigned int fn_found;
|
||||
DECLARE_BITMAP(pressed_numlock, KEY_CNT);
|
||||
struct timer_list battery_timer;
|
||||
+ struct apple_sc_backlight *backlight;
|
||||
};
|
||||
|
||||
struct apple_key_translation {
|
||||
@@ -70,6 +79,19 @@ struct apple_key_translation {
|
||||
@@ -76,6 +85,19 @@ struct apple_key_translation {
|
||||
u8 flags;
|
||||
};
|
||||
|
||||
@@ -71,10 +73,10 @@ index 6b8f0d004d34..e03a621bc741 100644
|
||||
+ u16 rate;
|
||||
+};
|
||||
+
|
||||
static const struct apple_key_translation macbookair_fn_keys[] = {
|
||||
static const struct apple_key_translation apple2021_fn_keys[] = {
|
||||
{ KEY_BACKSPACE, KEY_DELETE },
|
||||
{ KEY_ENTER, KEY_INSERT },
|
||||
@@ -414,6 +436,105 @@ static int apple_input_configured(struct hid_device *hdev,
|
||||
@@ -530,6 +552,105 @@ static int apple_input_configured(struct hid_device *hdev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -180,9 +182,9 @@ index 6b8f0d004d34..e03a621bc741 100644
|
||||
static int apple_probe(struct hid_device *hdev,
|
||||
const struct hid_device_id *id)
|
||||
{
|
||||
@@ -449,6 +570,9 @@ static int apple_probe(struct hid_device *hdev,
|
||||
return ret;
|
||||
}
|
||||
@@ -565,6 +686,9 @@ static int apple_probe(struct hid_device *hdev,
|
||||
jiffies + msecs_to_jiffies(APPLE_BATTERY_TIMEOUT_MS));
|
||||
apple_fetch_battery(hdev);
|
||||
|
||||
+ if (quirks & APPLE_BACKLIGHT_CTL)
|
||||
+ apple_backlight_init(hdev);
|
||||
@@ -191,5 +193,5 @@ index 6b8f0d004d34..e03a621bc741 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.30.1
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
From 6edcf53c9ed03fc033a75269276b640673313407 Mon Sep 17 00:00:00 2001
|
||||
From: Aun-Ali Zaidi <admin@kodeit.net>
|
||||
Date: Thu, 3 Feb 2022 12:22:09 +0000
|
||||
Subject: [PATCH] HID: apple: Add necessary IDs and configuration for T2 Macs.
|
||||
|
||||
This patch adds the necessary IDs and configuration for Macs with
|
||||
the T2 Security chip.
|
||||
|
||||
Signed-off-by: Aun-Ali Zaidi <admin@kodeit.net>
|
||||
Signed-off-by: Aditya Garg <gargaditya08@live.com>
|
||||
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
||||
---
|
||||
drivers/hid/hid-apple.c | 16 ++++++++++++++++
|
||||
drivers/hid/hid-ids.h | 8 ++++++++
|
||||
drivers/hid/hid-quirks.c | 16 ++++++++++++++++
|
||||
3 files changed, 40 insertions(+)
|
||||
|
||||
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
|
||||
index 5c5991741..e21c64c47 100644
|
||||
--- a/drivers/hid/hid-apple.c
|
||||
+++ b/drivers/hid/hid-apple.c
|
||||
@@ -860,6 +860,22 @@ static const struct hid_device_id apple_devices[] = {
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_JIS),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K),
|
||||
+ .driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J132),
|
||||
+ .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_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J214K),
|
||||
+ .driver_data = APPLE_HAS_FN },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J223),
|
||||
+ .driver_data = APPLE_HAS_FN },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J230K),
|
||||
+ .driver_data = APPLE_HAS_FN },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J152F),
|
||||
+ .driver_data = APPLE_HAS_FN },
|
||||
{ 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 78bd3ddda..6c2a36b16 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -167,6 +167,14 @@
|
||||
#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_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 c066ba901..dc67717d2 100644
|
||||
--- a/drivers/hid/hid-quirks.c
|
||||
+++ b/drivers/hid/hid-quirks.c
|
||||
@@ -295,6 +295,14 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_ANSI) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_ISO) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_JIS) },
|
||||
+ { 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_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) },
|
||||
@@ -930,6 +938,14 @@ static const struct hid_device_id hid_mouse_ignore_list[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_ANSI) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_ISO) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_JIS) },
|
||||
+ { 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_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) },
|
||||
{ }
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,112 +0,0 @@
|
||||
From 7d6971c788f4c89fdc43f370943bd4082be74279 Mon Sep 17 00:00:00 2001
|
||||
From: Aun-Ali Zaidi <admin@kodeit.net>
|
||||
Date: Sun, 31 Jan 2021 00:39:07 -0600
|
||||
Subject: [PATCH 2/9] HID: apple: Add support for MacbookAir8,1
|
||||
keyboard/trackpad
|
||||
|
||||
This commit adds the necessary IDs and configuration for the MacBook Air
|
||||
(Retina, 13-inch, 2018) [MacBookAir8,1 J140K iBridge2,8].
|
||||
|
||||
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 | 19 +++++++++++++++++++
|
||||
4 files changed, 24 insertions(+)
|
||||
|
||||
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
|
||||
index e03a621bc741..1f923565f9e9 100644
|
||||
--- a/drivers/hid/hid-apple.c
|
||||
+++ b/drivers/hid/hid-apple.c
|
||||
@@ -731,6 +731,8 @@ static const struct hid_device_id apple_devices[] = {
|
||||
.driver_data = APPLE_HAS_FN },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_JIS),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K),
|
||||
+ .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 94180c63571e..3d22da749aa3 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -165,6 +165,7 @@
|
||||
#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_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 142e9dae2837..fdd0b212cfcb 100644
|
||||
--- a/drivers/hid/hid-quirks.c
|
||||
+++ b/drivers/hid/hid-quirks.c
|
||||
@@ -289,6 +289,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_ANSI) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_ISO) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_JIS) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K) },
|
||||
{ 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) },
|
||||
@@ -923,6 +924,7 @@ static const struct hid_device_id hid_mouse_ignore_list[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_ANSI) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_ISO) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_JIS) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K) },
|
||||
{ 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 59a14505b9cd..bf610d2d8c69 100644
|
||||
--- a/drivers/input/mouse/bcm5974.c
|
||||
+++ b/drivers/input/mouse/bcm5974.c
|
||||
@@ -83,6 +83,10 @@
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRING9_ISO 0x0273
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRING9_JIS 0x0274
|
||||
|
||||
+/* T2-Attached Devices */
|
||||
+/* MacbookAir8,1 (2018) */
|
||||
+#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K 0x027a
|
||||
+
|
||||
#define BCM5974_DEVICE(prod) { \
|
||||
.match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \
|
||||
USB_DEVICE_ID_MATCH_INT_CLASS | \
|
||||
@@ -147,6 +151,8 @@ static const struct usb_device_id bcm5974_table[] = {
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING9_ANSI),
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING9_ISO),
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING9_JIS),
|
||||
+ /* MacbookAir8,1 */
|
||||
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K),
|
||||
/* Terminating entry */
|
||||
{}
|
||||
};
|
||||
@@ -483,6 +489,19 @@ static const struct bcm5974_config bcm5974_config_table[] = {
|
||||
{ SN_COORD, -203, 6803 },
|
||||
{ SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
|
||||
},
|
||||
+ {
|
||||
+ USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K,
|
||||
+ 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.1
|
||||
|
||||
+15
-13
@@ -1,17 +1,21 @@
|
||||
From c5f09b1b45cbb90147846f82ec0489789c99667e Mon Sep 17 00:00:00 2001
|
||||
From: Aditya Garg <gargaditya08@live.com>
|
||||
Date: Thu, 3 Feb 2022 12:23:02 +0000
|
||||
Subject: HID: apple: Add fn mapping for MacBook Pros with Touch Bar
|
||||
|
||||
This patch adds the Fn mapping for keyboards on certain T2 Macs.
|
||||
|
||||
Signed-off-by: Aditya Garg <gargaditya08@live.com>
|
||||
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
||||
---
|
||||
drivers/hid/hid-apple.c | 64 ++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 63 insertions(+), 1 deletion(-)
|
||||
drivers/hid/hid-apple.c | 62 +++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 62 insertions(+)
|
||||
|
||||
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
|
||||
index b6e1a29a2..70e9f6f74 100644
|
||||
index e21c64c47..aefab2a75 100644
|
||||
--- a/drivers/hid/hid-apple.c
|
||||
+++ b/drivers/hid/hid-apple.c
|
||||
@@ -113,6 +113,51 @@ static const struct apple_key_translation macbookair_fn_keys[] = {
|
||||
@@ -141,6 +141,51 @@ static const struct apple_key_translation macbookair_fn_keys[] = {
|
||||
{ }
|
||||
};
|
||||
|
||||
@@ -63,12 +67,11 @@ index b6e1a29a2..70e9f6f74 100644
|
||||
static const struct apple_key_translation apple_fn_keys[] = {
|
||||
{ KEY_BACKSPACE, KEY_DELETE },
|
||||
{ KEY_ENTER, KEY_INSERT },
|
||||
@@ -236,7 +281,18 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
|
||||
}
|
||||
|
||||
if (fnmode) {
|
||||
- if (hid->product >= USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI &&
|
||||
+ if (hid->product == USB_DEVICE_ID_APPLE_WELLSPRINGT2_J132 ||
|
||||
@@ -268,6 +313,17 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
|
||||
hid->product == USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2021 ||
|
||||
hid->product == USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2021)
|
||||
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_J213)
|
||||
+ table = macbookpro_no_esc_fn_keys;
|
||||
@@ -79,11 +82,10 @@ index b6e1a29a2..70e9f6f74 100644
|
||||
+ else if (hid->product == USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K ||
|
||||
+ hid->product == USB_DEVICE_ID_APPLE_WELLSPRINGT2_J230K)
|
||||
+ table = apple_fn_keys;
|
||||
+ else if (hid->product >= USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI &&
|
||||
else if (hid->product >= USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI &&
|
||||
hid->product <= USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS)
|
||||
table = macbookair_fn_keys;
|
||||
else if (hid->product < 0x21d || hid->product >= 0x300)
|
||||
@@ -386,6 +442,12 @@ static void apple_setup_input(struct input_dev *input)
|
||||
@@ -479,6 +535,12 @@ static void apple_setup_input(struct input_dev *input)
|
||||
set_bit(KEY_NUMLOCK, input->keybit);
|
||||
|
||||
/* Enable all needed keys */
|
||||
@@ -1,110 +0,0 @@
|
||||
From af20038d6da35329434a447d1e70c3f18a532a33 Mon Sep 17 00:00:00 2001
|
||||
From: Aun-Ali Zaidi <admin@kodeit.net>
|
||||
Date: Sun, 31 Jan 2021 01:04:22 -0600
|
||||
Subject: [PATCH 3/9] HID: apple: Add support for MacBookPro15,2
|
||||
keyboard/trackpad
|
||||
|
||||
This commit adds the necessary IDs and configuration for the MacBook Pro
|
||||
(13-inch, 2019, Four Thunderbolt 3 ports) [MacBookPro15,2 J132 iBridge2,4]
|
||||
|
||||
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 1f923565f9e9..76d6535fc663 100644
|
||||
--- a/drivers/hid/hid-apple.c
|
||||
+++ b/drivers/hid/hid-apple.c
|
||||
@@ -733,6 +733,8 @@ static const struct hid_device_id apple_devices[] = {
|
||||
.driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J132),
|
||||
+ .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 3d22da749aa3..9741153715ff 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -166,6 +166,7 @@
|
||||
#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_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 fdd0b212cfcb..7df65c99e984 100644
|
||||
--- a/drivers/hid/hid-quirks.c
|
||||
+++ b/drivers/hid/hid-quirks.c
|
||||
@@ -290,6 +290,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_ISO) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_JIS) },
|
||||
{ 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_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) },
|
||||
@@ -925,6 +926,7 @@ static const struct hid_device_id hid_mouse_ignore_list[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_ISO) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_JIS) },
|
||||
{ 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_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 bf610d2d8c69..81c1dac1da81 100644
|
||||
--- a/drivers/input/mouse/bcm5974.c
|
||||
+++ b/drivers/input/mouse/bcm5974.c
|
||||
@@ -86,6 +86,8 @@
|
||||
/* T2-Attached Devices */
|
||||
/* MacbookAir8,1 (2018) */
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K 0x027a
|
||||
+/* MacbookPro15,2 (2018) */
|
||||
+#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J132 0x027b
|
||||
|
||||
#define BCM5974_DEVICE(prod) { \
|
||||
.match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \
|
||||
@@ -153,6 +155,8 @@ static const struct usb_device_id bcm5974_table[] = {
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING9_JIS),
|
||||
/* MacbookAir8,1 */
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K),
|
||||
+ /* MacbookPro15,2 */
|
||||
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRINGT2_J132),
|
||||
/* Terminating entry */
|
||||
{}
|
||||
};
|
||||
@@ -502,6 +506,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_J132,
|
||||
+ 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.1
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
From 2e8c510fb3fe48deec46fd3be7c5838c6cd9ed74 Mon Sep 17 00:00:00 2001
|
||||
From: Aun-Ali Zaidi <admin@kodeit.net>
|
||||
Date: Sun, 31 Jan 2021 01:16:37 -0600
|
||||
Subject: [PATCH 4/9] HID: apple: Add support for MacBookPro15,1
|
||||
keyboard/trackpad
|
||||
|
||||
This commit adds the necessary IDs and configuration for the MacBook Pro
|
||||
(15-inch, 2018) [MacBookPro15,1 J680 iBridge2,3]
|
||||
|
||||
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 76d6535fc663..9ee795dcfa83 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_J132),
|
||||
.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_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 9741153715ff..b3e37a63e47e 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -167,6 +167,7 @@
|
||||
#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_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 7df65c99e984..32419a34a64d 100644
|
||||
--- a/drivers/hid/hid-quirks.c
|
||||
+++ b/drivers/hid/hid-quirks.c
|
||||
@@ -291,6 +291,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_JIS) },
|
||||
{ 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_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) },
|
||||
@@ -927,6 +928,7 @@ static const struct hid_device_id hid_mouse_ignore_list[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_JIS) },
|
||||
{ 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_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 81c1dac1da81..e7280b3c1a08 100644
|
||||
--- a/drivers/input/mouse/bcm5974.c
|
||||
+++ b/drivers/input/mouse/bcm5974.c
|
||||
@@ -88,6 +88,8 @@
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K 0x027a
|
||||
/* MacbookPro15,2 (2018) */
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J132 0x027b
|
||||
+/* MacbookPro15,1 (2018) */
|
||||
+#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680 0x027c
|
||||
|
||||
#define BCM5974_DEVICE(prod) { \
|
||||
.match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \
|
||||
@@ -157,6 +159,8 @@ static const struct usb_device_id bcm5974_table[] = {
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K),
|
||||
/* MacbookPro15,2 */
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRINGT2_J132),
|
||||
+ /* MacbookPro15,1 */
|
||||
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680),
|
||||
/* Terminating entry */
|
||||
{}
|
||||
};
|
||||
@@ -519,6 +523,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_J680,
|
||||
+ 0,
|
||||
+ 0,
|
||||
+ HAS_INTEGRATED_BUTTON,
|
||||
+ 0, sizeof(struct bt_data),
|
||||
+ 0x83, DATAFORMAT(TYPE4),
|
||||
+ { SN_PRESSURE, 0, 300 },
|
||||
+ { SN_WIDTH, 0, 2048 },
|
||||
+ { SN_COORD, -7456, 7976 },
|
||||
+ { SN_COORD, -1768, 7685 },
|
||||
+ { SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
|
||||
+ },
|
||||
{}
|
||||
};
|
||||
|
||||
--
|
||||
2.30.1
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
From 327e6e1d0f6e8db68c124dff4d6a326b381ccedb Mon Sep 17 00:00:00 2001
|
||||
From: Aditya Garg <gargaditya08@live.com>
|
||||
Date: Wed, 23 Mar 2022 17:12:21 +0530
|
||||
Subject: [PATCH] Input: bcm5974 - Add support for the T2 Macs
|
||||
|
||||
---
|
||||
drivers/input/mouse/bcm5974.c | 138 ++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 138 insertions(+)
|
||||
|
||||
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
|
||||
index 59a14505b..88f17f21a 100644
|
||||
--- a/drivers/input/mouse/bcm5974.c
|
||||
+++ b/drivers/input/mouse/bcm5974.c
|
||||
@@ -83,6 +83,24 @@
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRING9_ISO 0x0273
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRING9_JIS 0x0274
|
||||
|
||||
+/* T2-Attached Devices */
|
||||
+/* MacbookAir8,1 (2018) */
|
||||
+#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K 0x027a
|
||||
+/* MacbookPro15,2 (2018) */
|
||||
+#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
|
||||
+/* MacbookPro16,2 (2020) */
|
||||
+#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J214K 0x027e
|
||||
+/* MacbookPro16,3 (2020) */
|
||||
+#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 | \
|
||||
USB_DEVICE_ID_MATCH_INT_CLASS | \
|
||||
@@ -147,6 +165,22 @@ static const struct usb_device_id bcm5974_table[] = {
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING9_ANSI),
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING9_ISO),
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING9_JIS),
|
||||
+ /* MacbookAir8,1 */
|
||||
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K),
|
||||
+ /* MacbookPro15,2 */
|
||||
+ 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),
|
||||
+ /* MacbookPro16,2 */
|
||||
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRINGT2_J214K),
|
||||
+ /* MacbookPro16,3 */
|
||||
+ 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 */
|
||||
{}
|
||||
};
|
||||
@@ -483,6 +517,110 @@ static const struct bcm5974_config bcm5974_config_table[] = {
|
||||
{ SN_COORD, -203, 6803 },
|
||||
{ SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
|
||||
},
|
||||
+ {
|
||||
+ USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K,
|
||||
+ 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 }
|
||||
+ },
|
||||
+ {
|
||||
+ USB_DEVICE_ID_APPLE_WELLSPRINGT2_J132,
|
||||
+ 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 }
|
||||
+ },
|
||||
+ {
|
||||
+ USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680,
|
||||
+ 0,
|
||||
+ 0,
|
||||
+ HAS_INTEGRATED_BUTTON,
|
||||
+ 0, sizeof(struct bt_data),
|
||||
+ 0x83, DATAFORMAT(TYPE4),
|
||||
+ { SN_PRESSURE, 0, 300 },
|
||||
+ { SN_WIDTH, 0, 2048 },
|
||||
+ { SN_COORD, -7456, 7976 },
|
||||
+ { 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 }
|
||||
+ },
|
||||
+ {
|
||||
+ USB_DEVICE_ID_APPLE_WELLSPRINGT2_J214K,
|
||||
+ 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 }
|
||||
+ },
|
||||
+ {
|
||||
+ USB_DEVICE_ID_APPLE_WELLSPRINGT2_J223,
|
||||
+ 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 }
|
||||
+ },
|
||||
+ {
|
||||
+ USB_DEVICE_ID_APPLE_WELLSPRINGT2_J230K,
|
||||
+ 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 }
|
||||
+ },
|
||||
+ {
|
||||
+ 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, -8916, 9918 },
|
||||
+ { SN_COORD, -1934, 9835 },
|
||||
+ { SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
|
||||
+ },
|
||||
{}
|
||||
};
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
From f00e6b0e89c89233ca43348f2c74b93757cd7deb 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/9] 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 9ee795dcfa83..d59d6de017d6 100644
|
||||
--- a/drivers/hid/hid-apple.c
|
||||
+++ b/drivers/hid/hid-apple.c
|
||||
@@ -737,6 +737,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 b3e37a63e47e..aaa7cdf96481 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.1
|
||||
|
||||
@@ -1,111 +0,0 @@
|
||||
From 6ebbc10ae708e487bca63bbc59f1ba51a90e4f4c Mon Sep 17 00:00:00 2001
|
||||
From: Aun-Ali Zaidi <admin@kodeit.net>
|
||||
Date: Sun, 31 Jan 2021 02:00:14 -0600
|
||||
Subject: [PATCH 6/9] HID: apple: Add support for MacBookPro16,2
|
||||
keyboard/trackpad
|
||||
|
||||
This commit adds the necessary IDs and configuration for the MacBook Pro
|
||||
(13-inch, 2020, Four Thunderbolt 3 ports) [MacBookPro16,2 J214K
|
||||
iBridge2,16]
|
||||
|
||||
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 d59d6de017d6..4d1b88b57142 100644
|
||||
--- a/drivers/hid/hid-apple.c
|
||||
+++ b/drivers/hid/hid-apple.c
|
||||
@@ -739,6 +739,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_J213),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J214K),
|
||||
+ .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 aaa7cdf96481..861069c765c7 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -169,6 +169,7 @@
|
||||
#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_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 ee698d275427..d15b6fe0c8c2 100644
|
||||
--- a/drivers/hid/hid-quirks.c
|
||||
+++ b/drivers/hid/hid-quirks.c
|
||||
@@ -293,6 +293,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
||||
{ 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_WELLSPRINGT2_J214K) },
|
||||
{ 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) },
|
||||
@@ -931,6 +932,7 @@ static const struct hid_device_id hid_mouse_ignore_list[] = {
|
||||
{ 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_WELLSPRINGT2_J214K) },
|
||||
{ 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 3964f58fb870..00116c57d6cd 100644
|
||||
--- a/drivers/input/mouse/bcm5974.c
|
||||
+++ b/drivers/input/mouse/bcm5974.c
|
||||
@@ -92,6 +92,8 @@
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680 0x027c
|
||||
/* MacbookPro15,4 (2019) */
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J213 0x027d
|
||||
+/* MacbookPro16,2 (2020) */
|
||||
+#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J214K 0x027e
|
||||
|
||||
#define BCM5974_DEVICE(prod) { \
|
||||
.match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \
|
||||
@@ -165,6 +167,8 @@ static const struct usb_device_id bcm5974_table[] = {
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680),
|
||||
/* MacbookPro15,4 */
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRINGT2_J213),
|
||||
+ /* MacbookPro16,2 */
|
||||
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRINGT2_J214K),
|
||||
/* Terminating entry */
|
||||
{}
|
||||
};
|
||||
@@ -553,6 +557,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_J214K,
|
||||
+ 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.1
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
From 019200008a92c81db744f30ed5087633c48409ff Mon Sep 17 00:00:00 2001
|
||||
From: Aun-Ali Zaidi <admin@kodeit.net>
|
||||
Date: Sat, 13 Feb 2021 21:06:50 -0500
|
||||
Subject: [PATCH 7/9] HID: apple: Add support for MacBookPro16,3
|
||||
keyboard/trackpad
|
||||
|
||||
This commit adds the necessary IDs and configuration for the MacBook Pro
|
||||
(13-inch, 2020, Two Thunderbolt 3 ports) [MacBookPro16,3 J223 iBridge2,21]
|
||||
|
||||
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 4d1b88b57142..65e4137497b3 100644
|
||||
--- a/drivers/hid/hid-apple.c
|
||||
+++ b/drivers/hid/hid-apple.c
|
||||
@@ -741,6 +741,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_J214K),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J223),
|
||||
+ .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 861069c765c7..2a50ffd71e4e 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -170,6 +170,7 @@
|
||||
#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_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 d15b6fe0c8c2..73e07b1b8bf5 100644
|
||||
--- a/drivers/hid/hid-quirks.c
|
||||
+++ b/drivers/hid/hid-quirks.c
|
||||
@@ -294,6 +294,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
||||
{ 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_WELLSPRINGT2_J214K) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J223) },
|
||||
{ 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) },
|
||||
@@ -933,6 +934,7 @@ static const struct hid_device_id hid_mouse_ignore_list[] = {
|
||||
{ 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_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_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 00116c57d6cd..e50aec0c865e 100644
|
||||
--- a/drivers/input/mouse/bcm5974.c
|
||||
+++ b/drivers/input/mouse/bcm5974.c
|
||||
@@ -94,6 +94,8 @@
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J213 0x027d
|
||||
/* MacbookPro16,2 (2020) */
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J214K 0x027e
|
||||
+/* MacbookPro16,3 (2020) */
|
||||
+#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J223 0x027f
|
||||
|
||||
#define BCM5974_DEVICE(prod) { \
|
||||
.match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \
|
||||
@@ -169,6 +171,8 @@ static const struct usb_device_id bcm5974_table[] = {
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRINGT2_J213),
|
||||
/* MacbookPro16,2 */
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRINGT2_J214K),
|
||||
+ /* MacbookPro16,3 */
|
||||
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRINGT2_J223),
|
||||
/* Terminating entry */
|
||||
{}
|
||||
};
|
||||
@@ -570,6 +574,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_J223,
|
||||
+ 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.1
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
From 8e1462a94ac6c6e2fe407c88084beb03aa5a485f Mon Sep 17 00:00:00 2001
|
||||
From: Aun-Ali Zaidi <admin@kodeit.net>
|
||||
Date: Sun, 31 Jan 2021 02:16:15 -0600
|
||||
Subject: [PATCH 8/9] HID: apple: Add support for MacBookAir9,1
|
||||
keyboard/trackpad
|
||||
|
||||
This commit adds the necessary IDs and configuration for the MacBook Air
|
||||
(Retina, 13-inch, 2020) [MacBookAir9,1 J230K iBridge2,15]
|
||||
|
||||
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 65e4137497b3..2585986250d3 100644
|
||||
--- a/drivers/hid/hid-apple.c
|
||||
+++ b/drivers/hid/hid-apple.c
|
||||
@@ -743,6 +743,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_J223),
|
||||
.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_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 2a50ffd71e4e..a113c30f3898 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -171,6 +171,7 @@
|
||||
#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_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 73e07b1b8bf5..d9707ba949ee 100644
|
||||
--- a/drivers/hid/hid-quirks.c
|
||||
+++ b/drivers/hid/hid-quirks.c
|
||||
@@ -295,6 +295,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
||||
{ 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) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J230K) },
|
||||
{ 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) },
|
||||
@@ -935,6 +936,7 @@ static const struct hid_device_id hid_mouse_ignore_list[] = {
|
||||
{ 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) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J230K) },
|
||||
{ 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 e50aec0c865e..861afa9ac300 100644
|
||||
--- a/drivers/input/mouse/bcm5974.c
|
||||
+++ b/drivers/input/mouse/bcm5974.c
|
||||
@@ -96,6 +96,8 @@
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J214K 0x027e
|
||||
/* MacbookPro16,3 (2020) */
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J223 0x027f
|
||||
+/* MacbookAir9,1 (2020) */
|
||||
+#define USB_DEVICE_ID_APPLE_WELLSPRINGT2_J230K 0x0280
|
||||
|
||||
#define BCM5974_DEVICE(prod) { \
|
||||
.match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \
|
||||
@@ -173,6 +175,8 @@ static const struct usb_device_id bcm5974_table[] = {
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRINGT2_J214K),
|
||||
/* MacbookPro16,3 */
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRINGT2_J223),
|
||||
+ /* MacbookAir9,1 */
|
||||
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRINGT2_J230K),
|
||||
/* Terminating entry */
|
||||
{}
|
||||
};
|
||||
@@ -587,6 +591,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_J230K,
|
||||
+ 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.1
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
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, -8916, 9918 },
|
||||
+ { SN_COORD, -1934, 9835 },
|
||||
+ { SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
|
||||
+ },
|
||||
{}
|
||||
};
|
||||
|
||||
--
|
||||
2.30.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
From 75e93e9689b4e0b24ddd4367d241cfd90183f7d7 Mon Sep 17 00:00:00 2001
|
||||
From ce6287b8b9b620f4713825f0566be220aea18932 Mon Sep 17 00:00:00 2001
|
||||
From: Aditya Garg <gargaditya08@live.com>
|
||||
Date: Mon, 31 Jan 2022 19:10:18 +0530
|
||||
Date: Wed, 23 Mar 2022 17:27:15 +0530
|
||||
Subject: [PATCH] Fix for touchbar
|
||||
|
||||
---
|
||||
@@ -9,26 +9,26 @@ Subject: [PATCH] Fix for touchbar
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
||||
index 859750313..94aaf8777 100644
|
||||
index 6c2a36b16..5a3de3a8c 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -177,6 +177,8 @@
|
||||
#define USB_DEVICE_ID_APPLE_IRCONTROL4 0x8242
|
||||
#define USB_DEVICE_ID_APPLE_IRCONTROL5 0x8243
|
||||
@@ -185,6 +185,8 @@
|
||||
#define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2021 0x029c
|
||||
#define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2021 0x029a
|
||||
#define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2021 0x029f
|
||||
+#define USB_DEVICE_ID_APPLE_TOUCHBAR_BACKLIGHT 0x8102
|
||||
+#define USB_DEVICE_ID_APPLE_TOUCHBAR_DISPLAY 0x8302
|
||||
|
||||
#define USB_VENDOR_ID_ASUS 0x0486
|
||||
#define USB_DEVICE_ID_ASUS_T91MT 0x0185
|
||||
diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
|
||||
index 9af1dc8ae..2f5c54edc 100644
|
||||
index dc67717d2..70f602c64 100644
|
||||
--- a/drivers/hid/hid-quirks.c
|
||||
+++ b/drivers/hid/hid-quirks.c
|
||||
@@ -305,6 +305,8 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
|
||||
@@ -314,6 +314,8 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2021) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2021) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_TOUCHBAR_BACKLIGHT) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_TOUCHBAR_DISPLAY) },
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user