bcm5974.c (3bd7bf1f0fe14f591c089ae61bbfa9bd356f178a) bcm5974.c (8d80da90f53d37cf6caefc61353e1cc3a145b9e0)
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)

--- 70 unchanged lines hidden (view full) ---

79/* Macbook8,2 (unibody) */
80#define USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI 0x0252
81#define USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO 0x0253
82#define USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS 0x0254
83/* MacbookPro10,1 (unibody, June 2012) */
84#define USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI 0x0262
85#define USB_DEVICE_ID_APPLE_WELLSPRING7_ISO 0x0263
86#define USB_DEVICE_ID_APPLE_WELLSPRING7_JIS 0x0264
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)

--- 70 unchanged lines hidden (view full) ---

79/* Macbook8,2 (unibody) */
80#define USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI 0x0252
81#define USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO 0x0253
82#define USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS 0x0254
83/* MacbookPro10,1 (unibody, June 2012) */
84#define USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI 0x0262
85#define USB_DEVICE_ID_APPLE_WELLSPRING7_ISO 0x0263
86#define USB_DEVICE_ID_APPLE_WELLSPRING7_JIS 0x0264
87/* MacbookPro10,2 (unibody, October 2012) */
88#define USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI 0x0259
89#define USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO 0x025a
90#define USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS 0x025b
87
88#define BCM5974_DEVICE(prod) { \
89 .match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \
90 USB_DEVICE_ID_MATCH_INT_CLASS | \
91 USB_DEVICE_ID_MATCH_INT_PROTOCOL), \
92 .idVendor = USB_VENDOR_ID_APPLE, \
93 .idProduct = (prod), \
94 .bInterfaceClass = USB_INTERFACE_CLASS_HID, \

--- 37 unchanged lines hidden (view full) ---

132 /* MacbookPro8,2 */
133 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI),
134 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO),
135 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS),
136 /* MacbookPro10,1 */
137 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI),
138 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_ISO),
139 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_JIS),
91
92#define BCM5974_DEVICE(prod) { \
93 .match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \
94 USB_DEVICE_ID_MATCH_INT_CLASS | \
95 USB_DEVICE_ID_MATCH_INT_PROTOCOL), \
96 .idVendor = USB_VENDOR_ID_APPLE, \
97 .idProduct = (prod), \
98 .bInterfaceClass = USB_INTERFACE_CLASS_HID, \

--- 37 unchanged lines hidden (view full) ---

136 /* MacbookPro8,2 */
137 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI),
138 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO),
139 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS),
140 /* MacbookPro10,1 */
141 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI),
142 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_ISO),
143 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_JIS),
144 /* MacbookPro10,2 */
145 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI),
146 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO),
147 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS),
140 /* Terminating entry */
141 {}
142};
143MODULE_DEVICE_TABLE(usb, bcm5974_table);
144
145MODULE_AUTHOR("Henrik Rydberg");
146MODULE_DESCRIPTION("Apple USB BCM5974 multitouch driver");
147MODULE_LICENSE("GPL");

--- 226 unchanged lines hidden (view full) ---

374 0x84, sizeof(struct bt_data),
375 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS,
376 { SN_PRESSURE, 0, 300 },
377 { SN_WIDTH, 0, 2048 },
378 { SN_COORD, -4750, 5280 },
379 { SN_COORD, -150, 6730 },
380 { SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
381 },
148 /* Terminating entry */
149 {}
150};
151MODULE_DEVICE_TABLE(usb, bcm5974_table);
152
153MODULE_AUTHOR("Henrik Rydberg");
154MODULE_DESCRIPTION("Apple USB BCM5974 multitouch driver");
155MODULE_LICENSE("GPL");

--- 226 unchanged lines hidden (view full) ---

382 0x84, sizeof(struct bt_data),
383 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS,
384 { SN_PRESSURE, 0, 300 },
385 { SN_WIDTH, 0, 2048 },
386 { SN_COORD, -4750, 5280 },
387 { SN_COORD, -150, 6730 },
388 { SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
389 },
390 {
391 USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI,
392 USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO,
393 USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS,
394 HAS_INTEGRATED_BUTTON,
395 0x84, sizeof(struct bt_data),
396 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS,
397 { SN_PRESSURE, 0, 300 },
398 { SN_WIDTH, 0, 2048 },
399 { SN_COORD, -4750, 5280 },
400 { SN_COORD, -150, 6730 },
401 { SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
402 },
382 {}
383};
384
385/* return the device-specific configuration by device */
386static const struct bcm5974_config *bcm5974_get_config(struct usb_device *udev)
387{
388 u16 id = le16_to_cpu(udev->descriptor.idProduct);
389 const struct bcm5974_config *cfg;

--- 542 unchanged lines hidden ---
403 {}
404};
405
406/* return the device-specific configuration by device */
407static const struct bcm5974_config *bcm5974_get_config(struct usb_device *udev)
408{
409 u16 id = le16_to_cpu(udev->descriptor.idProduct);
410 const struct bcm5974_config *cfg;

--- 542 unchanged lines hidden ---