mirror of
https://github.com/raspberrypi/linux.git
synced 2026-01-03 08:14:12 +00:00
Merge branch 'for-6.17/apple' into for-linus
- fix for potential NULL pointer dereference in hid-apple that could be caused by malicious device with APPLE_MAGIC_BACKLIGHT quirk present triggering overflow in data field (Qasim Ijaz) - third party trackpart support for MacBookPro15,1 (Aditya Garg) - Apple Magic Keyboard A311[89] USB-C support (Aditya Garg, Grigorii Sokolik)
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
#include "hid-ids.h"
|
||||
|
||||
#define APPLE_RDESC_JIS BIT(0)
|
||||
#define APPLE_IGNORE_MOUSE BIT(1)
|
||||
/* BIT(1) reserved, was: APPLE_IGNORE_MOUSE */
|
||||
#define APPLE_HAS_FN BIT(2)
|
||||
/* BIT(3) reserved, was: APPLE_HIDDEV */
|
||||
#define APPLE_ISO_TILDE_QUIRK BIT(4)
|
||||
@@ -42,8 +42,10 @@
|
||||
#define APPLE_BACKLIGHT_CTL BIT(10)
|
||||
#define APPLE_IS_NON_APPLE BIT(11)
|
||||
#define APPLE_MAGIC_BACKLIGHT BIT(12)
|
||||
#define APPLE_DISABLE_FKEYS BIT(13)
|
||||
|
||||
#define APPLE_FLAG_FKEY 0x01
|
||||
#define APPLE_FLAG_FKEY BIT(0)
|
||||
#define APPLE_FLAG_TB_FKEY BIT(1)
|
||||
|
||||
#define HID_COUNTRY_INTERNATIONAL_ISO 13
|
||||
#define APPLE_BATTERY_TIMEOUT_MS 60000
|
||||
@@ -55,7 +57,7 @@
|
||||
static unsigned int fnmode = 3;
|
||||
module_param(fnmode, uint, 0644);
|
||||
MODULE_PARM_DESC(fnmode, "Mode of fn key on Apple keyboards (0 = disabled, "
|
||||
"1 = fkeyslast, 2 = fkeysfirst, [3] = auto)");
|
||||
"1 = fkeyslast, 2 = fkeysfirst, [3] = auto, 4 = fkeysdisabled)");
|
||||
|
||||
static int iso_layout = -1;
|
||||
module_param(iso_layout, int, 0644);
|
||||
@@ -89,6 +91,19 @@ struct apple_sc_backlight {
|
||||
struct hid_device *hdev;
|
||||
};
|
||||
|
||||
struct apple_backlight_config_report {
|
||||
u8 report_id;
|
||||
u8 version;
|
||||
u16 backlight_off, backlight_on_min, backlight_on_max;
|
||||
};
|
||||
|
||||
struct apple_backlight_set_report {
|
||||
u8 report_id;
|
||||
u8 version;
|
||||
u16 backlight;
|
||||
u16 rate;
|
||||
};
|
||||
|
||||
struct apple_magic_backlight {
|
||||
struct led_classdev cdev;
|
||||
struct hid_report *brightness;
|
||||
@@ -108,7 +123,7 @@ struct apple_sc {
|
||||
struct apple_key_translation {
|
||||
u16 from;
|
||||
u16 to;
|
||||
u8 flags;
|
||||
unsigned long flags;
|
||||
};
|
||||
|
||||
static const struct apple_key_translation magic_keyboard_alu_fn_keys[] = {
|
||||
@@ -152,21 +167,7 @@ static const struct apple_key_translation magic_keyboard_2015_fn_keys[] = {
|
||||
{ }
|
||||
};
|
||||
|
||||
struct apple_backlight_config_report {
|
||||
u8 report_id;
|
||||
u8 version;
|
||||
u16 backlight_off, backlight_on_min, backlight_on_max;
|
||||
};
|
||||
|
||||
struct apple_backlight_set_report {
|
||||
u8 report_id;
|
||||
u8 version;
|
||||
u16 backlight;
|
||||
u16 rate;
|
||||
};
|
||||
|
||||
|
||||
static const struct apple_key_translation apple2021_fn_keys[] = {
|
||||
static const struct apple_key_translation magic_keyboard_2021_and_2024_fn_keys[] = {
|
||||
{ KEY_BACKSPACE, KEY_DELETE },
|
||||
{ KEY_ENTER, KEY_INSERT },
|
||||
{ KEY_F1, KEY_BRIGHTNESSDOWN, APPLE_FLAG_FKEY },
|
||||
@@ -212,19 +213,19 @@ static const struct apple_key_translation macbookair_fn_keys[] = {
|
||||
static const struct apple_key_translation macbookpro_no_esc_fn_keys[] = {
|
||||
{ KEY_BACKSPACE, KEY_DELETE },
|
||||
{ KEY_ENTER, KEY_INSERT },
|
||||
{ KEY_GRAVE, KEY_ESC },
|
||||
{ KEY_1, KEY_F1 },
|
||||
{ KEY_2, KEY_F2 },
|
||||
{ KEY_3, KEY_F3 },
|
||||
{ KEY_4, KEY_F4 },
|
||||
{ KEY_5, KEY_F5 },
|
||||
{ KEY_6, KEY_F6 },
|
||||
{ KEY_7, KEY_F7 },
|
||||
{ KEY_8, KEY_F8 },
|
||||
{ KEY_9, KEY_F9 },
|
||||
{ KEY_0, KEY_F10 },
|
||||
{ KEY_MINUS, KEY_F11 },
|
||||
{ KEY_EQUAL, KEY_F12 },
|
||||
{ KEY_GRAVE, KEY_ESC, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_1, KEY_F1, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_2, KEY_F2, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_3, KEY_F3, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_4, KEY_F4, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_5, KEY_F5, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_6, KEY_F6, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_7, KEY_F7, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_8, KEY_F8, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_9, KEY_F9, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_0, KEY_F10, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_MINUS, KEY_F11, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_EQUAL, KEY_F12, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_UP, KEY_PAGEUP },
|
||||
{ KEY_DOWN, KEY_PAGEDOWN },
|
||||
{ KEY_LEFT, KEY_HOME },
|
||||
@@ -235,18 +236,18 @@ static const struct apple_key_translation macbookpro_no_esc_fn_keys[] = {
|
||||
static const struct apple_key_translation macbookpro_dedicated_esc_fn_keys[] = {
|
||||
{ KEY_BACKSPACE, KEY_DELETE },
|
||||
{ KEY_ENTER, KEY_INSERT },
|
||||
{ KEY_1, KEY_F1 },
|
||||
{ KEY_2, KEY_F2 },
|
||||
{ KEY_3, KEY_F3 },
|
||||
{ KEY_4, KEY_F4 },
|
||||
{ KEY_5, KEY_F5 },
|
||||
{ KEY_6, KEY_F6 },
|
||||
{ KEY_7, KEY_F7 },
|
||||
{ KEY_8, KEY_F8 },
|
||||
{ KEY_9, KEY_F9 },
|
||||
{ KEY_0, KEY_F10 },
|
||||
{ KEY_MINUS, KEY_F11 },
|
||||
{ KEY_EQUAL, KEY_F12 },
|
||||
{ KEY_1, KEY_F1, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_2, KEY_F2, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_3, KEY_F3, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_4, KEY_F4, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_5, KEY_F5, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_6, KEY_F6, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_7, KEY_F7, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_8, KEY_F8, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_9, KEY_F9, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_0, KEY_F10, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_MINUS, KEY_F11, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_EQUAL, KEY_F12, APPLE_FLAG_TB_FKEY },
|
||||
{ KEY_UP, KEY_PAGEUP },
|
||||
{ KEY_DOWN, KEY_PAGEDOWN },
|
||||
{ KEY_LEFT, KEY_HOME },
|
||||
@@ -425,7 +426,12 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
|
||||
unsigned int real_fnmode;
|
||||
|
||||
if (fnmode == 3) {
|
||||
real_fnmode = (asc->quirks & APPLE_IS_NON_APPLE) ? 2 : 1;
|
||||
if (asc->quirks & APPLE_DISABLE_FKEYS)
|
||||
real_fnmode = 4;
|
||||
else if (asc->quirks & APPLE_IS_NON_APPLE)
|
||||
real_fnmode = 2;
|
||||
else
|
||||
real_fnmode = 1;
|
||||
} else {
|
||||
real_fnmode = fnmode;
|
||||
}
|
||||
@@ -466,42 +472,54 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
|
||||
asc->fn_on = !!value;
|
||||
|
||||
if (real_fnmode) {
|
||||
if (hid->product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI ||
|
||||
hid->product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO ||
|
||||
hid->product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS ||
|
||||
hid->product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI ||
|
||||
hid->product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO ||
|
||||
hid->product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS ||
|
||||
hid->product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI ||
|
||||
hid->product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO ||
|
||||
hid->product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_JIS)
|
||||
switch (hid->product) {
|
||||
case USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI:
|
||||
case USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO:
|
||||
case USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS:
|
||||
case USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI:
|
||||
case USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO:
|
||||
case USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS:
|
||||
case USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI:
|
||||
case USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO:
|
||||
case USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_JIS:
|
||||
table = magic_keyboard_alu_fn_keys;
|
||||
else if (hid->product == USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2015 ||
|
||||
hid->product == USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2015)
|
||||
break;
|
||||
case USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2015:
|
||||
case USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2015:
|
||||
table = magic_keyboard_2015_fn_keys;
|
||||
else if (hid->product == USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2021 ||
|
||||
hid->product == USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024 ||
|
||||
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;
|
||||
else if (hid->product == USB_DEVICE_ID_APPLE_WELLSPRINGT2_J214K ||
|
||||
hid->product == USB_DEVICE_ID_APPLE_WELLSPRINGT2_J223 ||
|
||||
hid->product == USB_DEVICE_ID_APPLE_WELLSPRINGT2_J152F)
|
||||
table = macbookpro_dedicated_esc_fn_keys;
|
||||
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 &&
|
||||
hid->product <= USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS)
|
||||
table = macbookair_fn_keys;
|
||||
else if (hid->product < 0x21d || hid->product >= 0x300)
|
||||
table = powerbook_fn_keys;
|
||||
else
|
||||
break;
|
||||
case USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2021:
|
||||
case USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2021:
|
||||
case USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2021:
|
||||
case USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024:
|
||||
case USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2024:
|
||||
case USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2024:
|
||||
table = magic_keyboard_2021_and_2024_fn_keys;
|
||||
break;
|
||||
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:
|
||||
case USB_DEVICE_ID_APPLE_WELLSPRINGT2_J214K:
|
||||
case USB_DEVICE_ID_APPLE_WELLSPRINGT2_J223:
|
||||
table = macbookpro_dedicated_esc_fn_keys;
|
||||
break;
|
||||
case USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K:
|
||||
case USB_DEVICE_ID_APPLE_WELLSPRINGT2_J230K:
|
||||
table = apple_fn_keys;
|
||||
break;
|
||||
default:
|
||||
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)
|
||||
table = powerbook_fn_keys;
|
||||
else
|
||||
table = apple_fn_keys;
|
||||
}
|
||||
|
||||
trans = apple_find_translation(table, code);
|
||||
|
||||
@@ -524,9 +542,17 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
|
||||
do_translate = asc->fn_on;
|
||||
break;
|
||||
default:
|
||||
/* should never happen */
|
||||
/* case 4 */
|
||||
do_translate = false;
|
||||
}
|
||||
} else if (trans->flags & APPLE_FLAG_TB_FKEY) {
|
||||
switch (real_fnmode) {
|
||||
case 4:
|
||||
do_translate = false;
|
||||
break;
|
||||
default:
|
||||
do_translate = asc->fn_on;
|
||||
}
|
||||
} else {
|
||||
do_translate = asc->fn_on;
|
||||
}
|
||||
@@ -682,7 +708,7 @@ static void apple_setup_input(struct input_dev *input)
|
||||
apple_setup_key_translation(input, apple_iso_keyboard);
|
||||
apple_setup_key_translation(input, magic_keyboard_alu_fn_keys);
|
||||
apple_setup_key_translation(input, magic_keyboard_2015_fn_keys);
|
||||
apple_setup_key_translation(input, apple2021_fn_keys);
|
||||
apple_setup_key_translation(input, magic_keyboard_2021_and_2024_fn_keys);
|
||||
apple_setup_key_translation(input, macbookpro_no_esc_fn_keys);
|
||||
apple_setup_key_translation(input, macbookpro_dedicated_esc_fn_keys);
|
||||
}
|
||||
@@ -890,7 +916,8 @@ static int apple_magic_backlight_init(struct hid_device *hdev)
|
||||
backlight->brightness = report_enum->report_id_hash[APPLE_MAGIC_REPORT_ID_BRIGHTNESS];
|
||||
backlight->power = report_enum->report_id_hash[APPLE_MAGIC_REPORT_ID_POWER];
|
||||
|
||||
if (!backlight->brightness || !backlight->power)
|
||||
if (!backlight->brightness || backlight->brightness->maxfield < 2 ||
|
||||
!backlight->power || backlight->power->maxfield < 2)
|
||||
return -ENODEV;
|
||||
|
||||
backlight->cdev.name = ":white:" LED_FUNCTION_KBD_BACKLIGHT;
|
||||
@@ -1129,19 +1156,25 @@ static const struct hid_device_id apple_devices[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL | APPLE_ISO_TILDE_QUIRK },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J132),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL | APPLE_ISO_TILDE_QUIRK },
|
||||
.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),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL | APPLE_ISO_TILDE_QUIRK },
|
||||
.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 },
|
||||
.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_J214K),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_DISABLE_FKEYS },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J223),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_DISABLE_FKEYS },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J230K),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRINGT2_J152F),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_DISABLE_FKEYS },
|
||||
{ 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),
|
||||
@@ -1157,10 +1190,6 @@ static const struct hid_device_id apple_devices[] = {
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_RDESC_BATTERY },
|
||||
{ HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2021),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_RDESC_BATTERY },
|
||||
{ HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2021),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_RDESC_BATTERY },
|
||||
{ HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2021),
|
||||
@@ -1169,6 +1198,18 @@ static const struct hid_device_id apple_devices[] = {
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_RDESC_BATTERY },
|
||||
{ HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2021),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_RDESC_BATTERY },
|
||||
{ HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2024),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_RDESC_BATTERY },
|
||||
{ HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2024),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2024),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_RDESC_BATTERY },
|
||||
{ HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2024),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_TOUCHBAR_BACKLIGHT),
|
||||
.driver_data = APPLE_MAGIC_BACKLIGHT },
|
||||
|
||||
|
||||
@@ -167,20 +167,27 @@
|
||||
#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_JIS 0x0257
|
||||
#define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2015 0x0267
|
||||
#define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2015 0x026c
|
||||
#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_MAGIC_KEYBOARD_2024 0x0320
|
||||
#define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2024 0x0321
|
||||
#define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2024 0x0322
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI 0x0290
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRING8_ISO 0x0291
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRING8_JIS 0x0292
|
||||
#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
|
||||
@@ -188,10 +195,6 @@
|
||||
#define USB_DEVICE_ID_APPLE_IRCONTROL3 0x8241
|
||||
#define USB_DEVICE_ID_APPLE_IRCONTROL4 0x8242
|
||||
#define USB_DEVICE_ID_APPLE_IRCONTROL5 0x8243
|
||||
#define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2021 0x029c
|
||||
#define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024 0x0320
|
||||
#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
|
||||
|
||||
|
||||
@@ -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) },
|
||||
@@ -973,14 +974,6 @@ 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) },
|
||||
{ }
|
||||
|
||||
Reference in New Issue
Block a user