bcm5974.c (2d8ad8719591fa803b0d589ed057fa46f49b7155) | bcm5974.c (47340bd9fefb571888836da942b5aee0e85e959c) |
---|---|
1/* 2 * Apple USB BCM5974 (Macbook Air and Penryn Macbook Pro) multitouch driver 3 * 4 * Copyright (C) 2008 Henrik Rydberg (rydberg@euromail.se) 5 * 6 * The USB initialization and package decoding was made by 7 * Scott Shawcroft as part of the touchd user-space driver project: 8 * Copyright (C) 2008 Scott Shawcroft (scott.shawcroft@gmail.com) --- 49 unchanged lines hidden (view full) --- 58/* MacbookAir3,2 (unibody), aka wellspring5 */ 59#define USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI 0x023f 60#define USB_DEVICE_ID_APPLE_WELLSPRING4_ISO 0x0240 61#define USB_DEVICE_ID_APPLE_WELLSPRING4_JIS 0x0241 62/* MacbookAir3,1 (unibody), aka wellspring4 */ 63#define USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI 0x0242 64#define USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO 0x0243 65#define USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS 0x0244 | 1/* 2 * Apple USB BCM5974 (Macbook Air and Penryn Macbook Pro) multitouch driver 3 * 4 * Copyright (C) 2008 Henrik Rydberg (rydberg@euromail.se) 5 * 6 * The USB initialization and package decoding was made by 7 * Scott Shawcroft as part of the touchd user-space driver project: 8 * Copyright (C) 2008 Scott Shawcroft (scott.shawcroft@gmail.com) --- 49 unchanged lines hidden (view full) --- 58/* MacbookAir3,2 (unibody), aka wellspring5 */ 59#define USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI 0x023f 60#define USB_DEVICE_ID_APPLE_WELLSPRING4_ISO 0x0240 61#define USB_DEVICE_ID_APPLE_WELLSPRING4_JIS 0x0241 62/* MacbookAir3,1 (unibody), aka wellspring4 */ 63#define USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI 0x0242 64#define USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO 0x0243 65#define USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS 0x0244 |
66/* Macbook8 (unibody, March 2011) */ 67#define USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI 0x0245 68#define USB_DEVICE_ID_APPLE_WELLSPRING5_ISO 0x0246 69#define USB_DEVICE_ID_APPLE_WELLSPRING5_JIS 0x0247 |
|
66 67#define BCM5974_DEVICE(prod) { \ 68 .match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \ 69 USB_DEVICE_ID_MATCH_INT_CLASS | \ 70 USB_DEVICE_ID_MATCH_INT_PROTOCOL), \ 71 .idVendor = USB_VENDOR_ID_APPLE, \ 72 .idProduct = (prod), \ 73 .bInterfaceClass = USB_INTERFACE_CLASS_HID, \ --- 17 unchanged lines hidden (view full) --- 91 /* MacbookAir3,2 */ 92 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI), 93 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4_ISO), 94 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4_JIS), 95 /* MacbookAir3,1 */ 96 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI), 97 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO), 98 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS), | 70 71#define BCM5974_DEVICE(prod) { \ 72 .match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \ 73 USB_DEVICE_ID_MATCH_INT_CLASS | \ 74 USB_DEVICE_ID_MATCH_INT_PROTOCOL), \ 75 .idVendor = USB_VENDOR_ID_APPLE, \ 76 .idProduct = (prod), \ 77 .bInterfaceClass = USB_INTERFACE_CLASS_HID, \ --- 17 unchanged lines hidden (view full) --- 95 /* MacbookAir3,2 */ 96 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI), 97 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4_ISO), 98 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4_JIS), 99 /* MacbookAir3,1 */ 100 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI), 101 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO), 102 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS), |
103 /* MacbookPro8 */ 104 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI), 105 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5_ISO), 106 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5_JIS), |
|
99 /* Terminating entry */ 100 {} 101}; 102MODULE_DEVICE_TABLE(usb, bcm5974_table); 103 104MODULE_AUTHOR("Henrik Rydberg"); 105MODULE_DESCRIPTION("Apple USB BCM5974 multitouch driver"); 106MODULE_LICENSE("GPL"); --- 162 unchanged lines hidden (view full) --- 269 HAS_INTEGRATED_BUTTON, 270 0x84, sizeof(struct bt_data), 271 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS, 272 { DIM_PRESSURE, DIM_PRESSURE / SN_PRESSURE, 0, 300 }, 273 { DIM_WIDTH, DIM_WIDTH / SN_WIDTH, 0, 2048 }, 274 { DIM_X, DIM_X / SN_COORD, -4616, 5112 }, 275 { DIM_Y, DIM_Y / SN_COORD, -142, 5234 } 276 }, | 107 /* Terminating entry */ 108 {} 109}; 110MODULE_DEVICE_TABLE(usb, bcm5974_table); 111 112MODULE_AUTHOR("Henrik Rydberg"); 113MODULE_DESCRIPTION("Apple USB BCM5974 multitouch driver"); 114MODULE_LICENSE("GPL"); --- 162 unchanged lines hidden (view full) --- 277 HAS_INTEGRATED_BUTTON, 278 0x84, sizeof(struct bt_data), 279 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS, 280 { DIM_PRESSURE, DIM_PRESSURE / SN_PRESSURE, 0, 300 }, 281 { DIM_WIDTH, DIM_WIDTH / SN_WIDTH, 0, 2048 }, 282 { DIM_X, DIM_X / SN_COORD, -4616, 5112 }, 283 { DIM_Y, DIM_Y / SN_COORD, -142, 5234 } 284 }, |
285 { 286 USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI, 287 USB_DEVICE_ID_APPLE_WELLSPRING5_ISO, 288 USB_DEVICE_ID_APPLE_WELLSPRING5_JIS, 289 HAS_INTEGRATED_BUTTON, 290 0x84, sizeof(struct bt_data), 291 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS, 292 { DIM_PRESSURE, DIM_PRESSURE / SN_PRESSURE, 0, 300 }, 293 { DIM_WIDTH, DIM_WIDTH / SN_WIDTH, 0, 2048 }, 294 { DIM_X, DIM_X / SN_COORD, -4415, 5050 }, 295 { DIM_Y, DIM_Y / SN_COORD, -55, 6680 } 296 }, |
|
277 {} 278}; 279 280/* return the device-specific configuration by device */ 281static const struct bcm5974_config *bcm5974_get_config(struct usb_device *udev) 282{ 283 u16 id = le16_to_cpu(udev->descriptor.idProduct); 284 const struct bcm5974_config *cfg; --- 591 unchanged lines hidden --- | 297 {} 298}; 299 300/* return the device-specific configuration by device */ 301static const struct bcm5974_config *bcm5974_get_config(struct usb_device *udev) 302{ 303 u16 id = le16_to_cpu(udev->descriptor.idProduct); 304 const struct bcm5974_config *cfg; --- 591 unchanged lines hidden --- |