Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: bcm5974 - Add support for 2012 MacBook Pro Retina

Add support for the 15'' MacBook Pro Retina model (MacBookPro10,1).

Patch originally written by clipcarl (forums.opensuse.org).

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Henrik Rydberg and committed by
Dmitry Torokhov
3dde22a9 b2e6ad7d

+20
+20
drivers/input/mouse/bcm5974.c
··· 79 79 #define USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI 0x0252 80 80 #define USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO 0x0253 81 81 #define USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS 0x0254 82 + /* MacbookPro10,1 (unibody, June 2012) */ 83 + #define USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI 0x0262 84 + #define USB_DEVICE_ID_APPLE_WELLSPRING7_ISO 0x0263 85 + #define USB_DEVICE_ID_APPLE_WELLSPRING7_JIS 0x0264 82 86 83 87 #define BCM5974_DEVICE(prod) { \ 84 88 .match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \ ··· 132 128 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI), 133 129 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO), 134 130 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS), 131 + /* MacbookPro10,1 */ 132 + BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI), 133 + BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_ISO), 134 + BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_JIS), 135 135 /* Terminating entry */ 136 136 {} 137 137 }; ··· 361 353 { DIM_WIDTH, DIM_WIDTH / SN_WIDTH, 0, 2048 }, 362 354 { DIM_X, DIM_X / SN_COORD, -4620, 5140 }, 363 355 { DIM_Y, DIM_Y / SN_COORD, -150, 6600 } 356 + }, 357 + { 358 + USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI, 359 + USB_DEVICE_ID_APPLE_WELLSPRING7_ISO, 360 + USB_DEVICE_ID_APPLE_WELLSPRING7_JIS, 361 + HAS_INTEGRATED_BUTTON, 362 + 0x84, sizeof(struct bt_data), 363 + 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS, 364 + { DIM_PRESSURE, DIM_PRESSURE / SN_PRESSURE, 0, 300 }, 365 + { DIM_WIDTH, DIM_WIDTH / SN_WIDTH, 0, 2048 }, 366 + { DIM_X, DIM_X / SN_COORD, -4750, 5280 }, 367 + { DIM_Y, DIM_Y / SN_COORD, -150, 6730 } 364 368 }, 365 369 {} 366 370 };