# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/linux/hotfix-appledisplay.patch # Copyright (C) 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- Fixed hid-core to ignore Apple Cinema Display IDs, likewise - so the superiour appledisplay driver can bind to it. Make sure appledisplay probe logs an error in all error cases. Signed-off-by: René Rebe --- linux-6.8/drivers/hid/hid-quirks.c.vanilla 2024-05-15 20:58:19.041410745 +0200 +++ linux-6.8/drivers/hid/hid-quirks.c 2024-05-15 21:02:15.706436841 +0200 @@ -338,6 +338,15 @@ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL5) }, #endif +#if IS_ENABLED(CONFIG_APPLEDISPLAY) + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, 0x9218) }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, 0x9219) }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, 0x921c) }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, 0x921d) }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, 0x9222) }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, 0x9226) }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, 0x9236) }, +#endif #if IS_ENABLED(CONFIG_HID_ASUS) { HID_I2C_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_I2C_KEYBOARD) }, { HID_I2C_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_I2C_TOUCHPAD) }, --- linux-6.8/drivers/usb/misc/appledisplay.c.vanilla 2024-05-15 20:09:54.318090453 +0200 +++ linux-6.8/drivers/usb/misc/appledisplay.c 2024-05-15 21:03:24.610444439 +0200 @@ -250,7 +250,6 @@ GFP_KERNEL, &pdata->urb->transfer_dma); if (!pdata->urbdata) { retval = -ENOMEM; - dev_err(&iface->dev, "Allocating URB buffer failed\n"); goto error; } @@ -262,7 +261,6 @@ pdata->urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP; if (usb_submit_urb(pdata->urb, GFP_KERNEL)) { retval = -EIO; - dev_err(&iface->dev, "Submitting URB failed\n"); goto error; } @@ -285,8 +283,6 @@ if (brightness < 0) { retval = brightness; - dev_err(&iface->dev, - "Error while getting initial brightness: %d\n", retval); goto error; } @@ -301,6 +297,7 @@ return 0; error: + dev_err(&iface->dev, "Failed during probe: %d\n", retval); if (pdata) { if (pdata->urb) { usb_kill_urb(pdata->urb);