1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/linux/hotfix-appledisplay.patch
3 # Copyright (C) 2024 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This patch file is dual-licensed. It is available under the license the
9 # patched project is licensed under, as long as it is an OpenSource license
10 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
11 # of the GNU General Public License version 2 as used by the T2 SDE.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 Fixed hid-core to ignore Apple Cinema Display IDs, likewise - so the
15 superiour appledisplay driver can bind to it.
17 Make sure appledisplay probe logs an error in all error cases.
19 Signed-off-by: René Rebe <rene@exactcode.com>
21 --- linux-6.8/drivers/hid/hid-quirks.c.vanilla 2024-05-15 20:58:19.041410745 +0200
22 +++ linux-6.8/drivers/hid/hid-quirks.c 2024-05-15 21:02:15.706436841 +0200
24 { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) },
25 { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL5) },
27 +#if IS_ENABLED(CONFIG_APPLEDISPLAY)
28 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, 0x9218) },
29 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, 0x9219) },
30 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, 0x921c) },
31 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, 0x921d) },
32 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, 0x9222) },
33 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, 0x9226) },
34 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, 0x9236) },
36 #if IS_ENABLED(CONFIG_HID_ASUS)
37 { HID_I2C_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_I2C_KEYBOARD) },
38 { HID_I2C_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_I2C_TOUCHPAD) },
39 --- linux-6.8/drivers/usb/misc/appledisplay.c.vanilla 2024-05-15 20:09:54.318090453 +0200
40 +++ linux-6.8/drivers/usb/misc/appledisplay.c 2024-05-15 21:03:24.610444439 +0200
42 GFP_KERNEL, &pdata->urb->transfer_dma);
43 if (!pdata->urbdata) {
45 - dev_err(&iface->dev, "Allocating URB buffer failed\n");
50 pdata->urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
51 if (usb_submit_urb(pdata->urb, GFP_KERNEL)) {
53 - dev_err(&iface->dev, "Submitting URB failed\n");
61 - dev_err(&iface->dev,
62 - "Error while getting initial brightness: %d\n", retval);
70 + dev_err(&iface->dev, "Failed during probe: %d\n", retval);
73 usb_kill_urb(pdata->urb);