diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-11-29 04:51:07 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-11-29 04:51:07 -0500 |
commit | 0d2cd91bf7b1a7cc1d638296111fcc2bcf5c0bb4 (patch) | |
tree | d2ca69347816c27f9dc352581f5d0fe76811cd49 /drivers/input/mouse | |
parent | 3d95fd6ad8d3cf582a70ed65660017114b6e4065 (diff) | |
parent | caca6a03d365883564885f2c1da3e88dcf65d139 (diff) |
Merge commit 'v3.2-rc3' into next
Diffstat (limited to 'drivers/input/mouse')
-rw-r--r-- | drivers/input/mouse/bcm5974.c | 20 | ||||
-rw-r--r-- | drivers/input/mouse/elantech.c | 26 |
2 files changed, 38 insertions, 8 deletions
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c index da280189ef07..5ec617e28f7e 100644 --- a/drivers/input/mouse/bcm5974.c +++ b/drivers/input/mouse/bcm5974.c | |||
@@ -67,6 +67,10 @@ | |||
67 | #define USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI 0x0245 | 67 | #define USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI 0x0245 |
68 | #define USB_DEVICE_ID_APPLE_WELLSPRING5_ISO 0x0246 | 68 | #define USB_DEVICE_ID_APPLE_WELLSPRING5_ISO 0x0246 |
69 | #define USB_DEVICE_ID_APPLE_WELLSPRING5_JIS 0x0247 | 69 | #define USB_DEVICE_ID_APPLE_WELLSPRING5_JIS 0x0247 |
70 | /* MacbookAir4,1 (unibody, July 2011) */ | ||
71 | #define USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI 0x0249 | ||
72 | #define USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO 0x024a | ||
73 | #define USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS 0x024b | ||
70 | /* MacbookAir4,2 (unibody, July 2011) */ | 74 | /* MacbookAir4,2 (unibody, July 2011) */ |
71 | #define USB_DEVICE_ID_APPLE_WELLSPRING6_ANSI 0x024c | 75 | #define USB_DEVICE_ID_APPLE_WELLSPRING6_ANSI 0x024c |
72 | #define USB_DEVICE_ID_APPLE_WELLSPRING6_ISO 0x024d | 76 | #define USB_DEVICE_ID_APPLE_WELLSPRING6_ISO 0x024d |
@@ -112,6 +116,10 @@ static const struct usb_device_id bcm5974_table[] = { | |||
112 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI), | 116 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI), |
113 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5_ISO), | 117 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5_ISO), |
114 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5_JIS), | 118 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5_JIS), |
119 | /* MacbookAir4,1 */ | ||
120 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI), | ||
121 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO), | ||
122 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS), | ||
115 | /* MacbookAir4,2 */ | 123 | /* MacbookAir4,2 */ |
116 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING6_ANSI), | 124 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING6_ANSI), |
117 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING6_ISO), | 125 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING6_ISO), |
@@ -334,6 +342,18 @@ static const struct bcm5974_config bcm5974_config_table[] = { | |||
334 | { DIM_X, DIM_X / SN_COORD, -4750, 5280 }, | 342 | { DIM_X, DIM_X / SN_COORD, -4750, 5280 }, |
335 | { DIM_Y, DIM_Y / SN_COORD, -150, 6730 } | 343 | { DIM_Y, DIM_Y / SN_COORD, -150, 6730 } |
336 | }, | 344 | }, |
345 | { | ||
346 | USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI, | ||
347 | USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO, | ||
348 | USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS, | ||
349 | HAS_INTEGRATED_BUTTON, | ||
350 | 0x84, sizeof(struct bt_data), | ||
351 | 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS, | ||
352 | { DIM_PRESSURE, DIM_PRESSURE / SN_PRESSURE, 0, 300 }, | ||
353 | { DIM_WIDTH, DIM_WIDTH / SN_WIDTH, 0, 2048 }, | ||
354 | { DIM_X, DIM_X / SN_COORD, -4620, 5140 }, | ||
355 | { DIM_Y, DIM_Y / SN_COORD, -150, 6600 } | ||
356 | }, | ||
337 | {} | 357 | {} |
338 | }; | 358 | }; |
339 | 359 | ||
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index 59bfb70d330a..d2c0db159b18 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c | |||
@@ -1262,18 +1262,28 @@ static int elantech_reconnect(struct psmouse *psmouse) | |||
1262 | */ | 1262 | */ |
1263 | static int elantech_set_properties(struct elantech_data *etd) | 1263 | static int elantech_set_properties(struct elantech_data *etd) |
1264 | { | 1264 | { |
1265 | /* This represents the version of IC body. */ | ||
1265 | int ver = (etd->fw_version & 0x0f0000) >> 16; | 1266 | int ver = (etd->fw_version & 0x0f0000) >> 16; |
1266 | 1267 | ||
1268 | /* Early version of Elan touchpads doesn't obey the rule. */ | ||
1267 | if (etd->fw_version < 0x020030 || etd->fw_version == 0x020600) | 1269 | if (etd->fw_version < 0x020030 || etd->fw_version == 0x020600) |
1268 | etd->hw_version = 1; | 1270 | etd->hw_version = 1; |
1269 | else if (etd->fw_version < 0x150600) | 1271 | else { |
1270 | etd->hw_version = 2; | 1272 | switch (ver) { |
1271 | else if (ver == 5) | 1273 | case 2: |
1272 | etd->hw_version = 3; | 1274 | case 4: |
1273 | else if (ver == 6) | 1275 | etd->hw_version = 2; |
1274 | etd->hw_version = 4; | 1276 | break; |
1275 | else | 1277 | case 5: |
1276 | return -1; | 1278 | etd->hw_version = 3; |
1279 | break; | ||
1280 | case 6: | ||
1281 | etd->hw_version = 4; | ||
1282 | break; | ||
1283 | default: | ||
1284 | return -1; | ||
1285 | } | ||
1286 | } | ||
1277 | 1287 | ||
1278 | /* decide which send_cmd we're gonna use early */ | 1288 | /* decide which send_cmd we're gonna use early */ |
1279 | etd->send_cmd = etd->hw_version >= 3 ? elantech_send_cmd : | 1289 | etd->send_cmd = etd->hw_version >= 3 ? elantech_send_cmd : |