diff options
author | Andy Botting <andy@andybotting.com> | 2011-03-12 23:27:22 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-03-12 23:37:30 -0500 |
commit | 47340bd9fefb571888836da942b5aee0e85e959c (patch) | |
tree | 102ff176847bfb851800c5ca1d5cefba9f545cab /drivers | |
parent | 84eb5aa6ccb2a62c40722b8c5fb1338ea12155a3 (diff) |
Input: bcm5974 - add support for MacBookPro8
This patch add multitouch support for the MacBookPro8,1 and
MacBookPro8,2 models.
Cc: stable@kernel.org
Signed-off-by: Andy Botting <andy@andybotting.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hid/hid-apple.c | 6 | ||||
-rw-r--r-- | drivers/hid/hid-core.c | 6 | ||||
-rw-r--r-- | drivers/hid/hid-ids.h | 3 | ||||
-rw-r--r-- | drivers/input/mouse/bcm5974.c | 20 |
4 files changed, 35 insertions, 0 deletions
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c index 61aa71233392..b85744fe8464 100644 --- a/drivers/hid/hid-apple.c +++ b/drivers/hid/hid-apple.c | |||
@@ -481,6 +481,12 @@ static const struct hid_device_id apple_devices[] = { | |||
481 | .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD }, | 481 | .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD }, |
482 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS), | 482 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS), |
483 | .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS }, | 483 | .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS }, |
484 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI), | ||
485 | .driver_data = APPLE_HAS_FN }, | ||
486 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ISO), | ||
487 | .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD }, | ||
488 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS), | ||
489 | .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS }, | ||
484 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI), | 490 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI), |
485 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, | 491 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, |
486 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO), | 492 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO), |
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index d678cf3d33d5..48a0a2f3e072 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -1302,6 +1302,9 @@ static const struct hid_device_id hid_have_special_driver[] = { | |||
1302 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI) }, | 1302 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI) }, |
1303 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO) }, | 1303 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO) }, |
1304 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS) }, | 1304 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS) }, |
1305 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI) }, | ||
1306 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ISO) }, | ||
1307 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS) }, | ||
1305 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) }, | 1308 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) }, |
1306 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) }, | 1309 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) }, |
1307 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) }, | 1310 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) }, |
@@ -1801,6 +1804,9 @@ static const struct hid_device_id hid_mouse_ignore_list[] = { | |||
1801 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI) }, | 1804 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI) }, |
1802 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO) }, | 1805 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO) }, |
1803 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS) }, | 1806 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS) }, |
1807 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI) }, | ||
1808 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ISO) }, | ||
1809 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS) }, | ||
1804 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, | 1810 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, |
1805 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, | 1811 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, |
1806 | { } | 1812 | { } |
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 92a0d61a7379..ca32ecbdce06 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h | |||
@@ -103,6 +103,9 @@ | |||
103 | #define USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI 0x0242 | 103 | #define USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI 0x0242 |
104 | #define USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO 0x0243 | 104 | #define USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO 0x0243 |
105 | #define USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS 0x0244 | 105 | #define USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS 0x0244 |
106 | #define USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI 0x0245 | ||
107 | #define USB_DEVICE_ID_APPLE_WELLSPRING5_ISO 0x0246 | ||
108 | #define USB_DEVICE_ID_APPLE_WELLSPRING5_JIS 0x0247 | ||
106 | #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI 0x0239 | 109 | #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI 0x0239 |
107 | #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO 0x023a | 110 | #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO 0x023a |
108 | #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS 0x023b | 111 | #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS 0x023b |
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c index ee82851afe3e..318531424848 100644 --- a/drivers/input/mouse/bcm5974.c +++ b/drivers/input/mouse/bcm5974.c | |||
@@ -63,6 +63,10 @@ | |||
63 | #define USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI 0x0242 | 63 | #define USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI 0x0242 |
64 | #define USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO 0x0243 | 64 | #define USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO 0x0243 |
65 | #define USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS 0x0244 | 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 | 70 | ||
67 | #define BCM5974_DEVICE(prod) { \ | 71 | #define BCM5974_DEVICE(prod) { \ |
68 | .match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \ | 72 | .match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \ |
@@ -96,6 +100,10 @@ static const struct usb_device_id bcm5974_table[] = { | |||
96 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI), | 100 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI), |
97 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO), | 101 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO), |
98 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS), | 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 */ | 107 | /* Terminating entry */ |
100 | {} | 108 | {} |
101 | }; | 109 | }; |
@@ -274,6 +282,18 @@ static const struct bcm5974_config bcm5974_config_table[] = { | |||
274 | { DIM_X, DIM_X / SN_COORD, -4616, 5112 }, | 282 | { DIM_X, DIM_X / SN_COORD, -4616, 5112 }, |
275 | { DIM_Y, DIM_Y / SN_COORD, -142, 5234 } | 283 | { DIM_Y, DIM_Y / SN_COORD, -142, 5234 } |
276 | }, | 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 | {} | 297 | {} |
278 | }; | 298 | }; |
279 | 299 | ||