diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-03-19 02:38:50 -0400 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-03-19 02:38:50 -0400 |
| commit | 97eb3f24352ec6632c2127b35d8087d2a809a9b9 (patch) | |
| tree | 722948059bbd325bbca232269490124231df80d4 /drivers/input/mouse | |
| parent | 439581ec07fa9cf3f519dd461a2cf41cfd3adcb4 (diff) | |
| parent | def179c271ac9b5020deca798470521f14d11edd (diff) | |
Merge branch 'next' into for-linus
Diffstat (limited to 'drivers/input/mouse')
| -rw-r--r-- | drivers/input/mouse/Kconfig | 10 | ||||
| -rw-r--r-- | drivers/input/mouse/bcm5974.c | 60 | ||||
| -rw-r--r-- | drivers/input/mouse/synaptics_i2c.c | 16 |
3 files changed, 74 insertions, 12 deletions
diff --git a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig index bf5fd7f6a313..9c1e6ee83531 100644 --- a/drivers/input/mouse/Kconfig +++ b/drivers/input/mouse/Kconfig | |||
| @@ -39,7 +39,7 @@ config MOUSE_PS2 | |||
| 39 | module will be called psmouse. | 39 | module will be called psmouse. |
| 40 | 40 | ||
| 41 | config MOUSE_PS2_ALPS | 41 | config MOUSE_PS2_ALPS |
| 42 | bool "ALPS PS/2 mouse protocol extension" if EMBEDDED | 42 | bool "ALPS PS/2 mouse protocol extension" if EXPERT |
| 43 | default y | 43 | default y |
| 44 | depends on MOUSE_PS2 | 44 | depends on MOUSE_PS2 |
| 45 | help | 45 | help |
| @@ -49,7 +49,7 @@ config MOUSE_PS2_ALPS | |||
| 49 | If unsure, say Y. | 49 | If unsure, say Y. |
| 50 | 50 | ||
| 51 | config MOUSE_PS2_LOGIPS2PP | 51 | config MOUSE_PS2_LOGIPS2PP |
| 52 | bool "Logitech PS/2++ mouse protocol extension" if EMBEDDED | 52 | bool "Logitech PS/2++ mouse protocol extension" if EXPERT |
| 53 | default y | 53 | default y |
| 54 | depends on MOUSE_PS2 | 54 | depends on MOUSE_PS2 |
| 55 | help | 55 | help |
| @@ -59,7 +59,7 @@ config MOUSE_PS2_LOGIPS2PP | |||
| 59 | If unsure, say Y. | 59 | If unsure, say Y. |
| 60 | 60 | ||
| 61 | config MOUSE_PS2_SYNAPTICS | 61 | config MOUSE_PS2_SYNAPTICS |
| 62 | bool "Synaptics PS/2 mouse protocol extension" if EMBEDDED | 62 | bool "Synaptics PS/2 mouse protocol extension" if EXPERT |
| 63 | default y | 63 | default y |
| 64 | depends on MOUSE_PS2 | 64 | depends on MOUSE_PS2 |
| 65 | help | 65 | help |
| @@ -69,7 +69,7 @@ config MOUSE_PS2_SYNAPTICS | |||
| 69 | If unsure, say Y. | 69 | If unsure, say Y. |
| 70 | 70 | ||
| 71 | config MOUSE_PS2_LIFEBOOK | 71 | config MOUSE_PS2_LIFEBOOK |
| 72 | bool "Fujitsu Lifebook PS/2 mouse protocol extension" if EMBEDDED | 72 | bool "Fujitsu Lifebook PS/2 mouse protocol extension" if EXPERT |
| 73 | default y | 73 | default y |
| 74 | depends on MOUSE_PS2 && X86 && DMI | 74 | depends on MOUSE_PS2 && X86 && DMI |
| 75 | help | 75 | help |
| @@ -79,7 +79,7 @@ config MOUSE_PS2_LIFEBOOK | |||
| 79 | If unsure, say Y. | 79 | If unsure, say Y. |
| 80 | 80 | ||
| 81 | config MOUSE_PS2_TRACKPOINT | 81 | config MOUSE_PS2_TRACKPOINT |
| 82 | bool "IBM Trackpoint PS/2 mouse protocol extension" if EMBEDDED | 82 | bool "IBM Trackpoint PS/2 mouse protocol extension" if EXPERT |
| 83 | default y | 83 | default y |
| 84 | depends on MOUSE_PS2 | 84 | depends on MOUSE_PS2 |
| 85 | help | 85 | help |
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c index d24837210f04..3aead91bacc8 100644 --- a/drivers/input/mouse/bcm5974.c +++ b/drivers/input/mouse/bcm5974.c | |||
| @@ -55,6 +55,18 @@ | |||
| 55 | #define USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI 0x0236 | 55 | #define USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI 0x0236 |
| 56 | #define USB_DEVICE_ID_APPLE_WELLSPRING3_ISO 0x0237 | 56 | #define USB_DEVICE_ID_APPLE_WELLSPRING3_ISO 0x0237 |
| 57 | #define USB_DEVICE_ID_APPLE_WELLSPRING3_JIS 0x0238 | 57 | #define USB_DEVICE_ID_APPLE_WELLSPRING3_JIS 0x0238 |
| 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 | ||
| 58 | 70 | ||
| 59 | #define BCM5974_DEVICE(prod) { \ | 71 | #define BCM5974_DEVICE(prod) { \ |
| 60 | .match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \ | 72 | .match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \ |
| @@ -80,6 +92,18 @@ static const struct usb_device_id bcm5974_table[] = { | |||
| 80 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI), | 92 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI), |
| 81 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING3_ISO), | 93 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING3_ISO), |
| 82 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING3_JIS), | 94 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING3_JIS), |
| 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), | ||
| 83 | /* Terminating entry */ | 107 | /* Terminating entry */ |
| 84 | {} | 108 | {} |
| 85 | }; | 109 | }; |
| @@ -234,6 +258,42 @@ static const struct bcm5974_config bcm5974_config_table[] = { | |||
| 234 | { DIM_X, DIM_X / SN_COORD, -4460, 5166 }, | 258 | { DIM_X, DIM_X / SN_COORD, -4460, 5166 }, |
| 235 | { DIM_Y, DIM_Y / SN_COORD, -75, 6700 } | 259 | { DIM_Y, DIM_Y / SN_COORD, -75, 6700 } |
| 236 | }, | 260 | }, |
| 261 | { | ||
| 262 | USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI, | ||
| 263 | USB_DEVICE_ID_APPLE_WELLSPRING4_ISO, | ||
| 264 | USB_DEVICE_ID_APPLE_WELLSPRING4_JIS, | ||
| 265 | HAS_INTEGRATED_BUTTON, | ||
| 266 | 0x84, sizeof(struct bt_data), | ||
| 267 | 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS, | ||
| 268 | { DIM_PRESSURE, DIM_PRESSURE / SN_PRESSURE, 0, 300 }, | ||
| 269 | { DIM_WIDTH, DIM_WIDTH / SN_WIDTH, 0, 2048 }, | ||
| 270 | { DIM_X, DIM_X / SN_COORD, -4620, 5140 }, | ||
| 271 | { DIM_Y, DIM_Y / SN_COORD, -150, 6600 } | ||
| 272 | }, | ||
| 273 | { | ||
| 274 | USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI, | ||
| 275 | USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO, | ||
| 276 | USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS, | ||
| 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 | }, | ||
| 237 | {} | 297 | {} |
| 238 | }; | 298 | }; |
| 239 | 299 | ||
diff --git a/drivers/input/mouse/synaptics_i2c.c b/drivers/input/mouse/synaptics_i2c.c index 0ae62f0bcb32..f6aa26d305ed 100644 --- a/drivers/input/mouse/synaptics_i2c.c +++ b/drivers/input/mouse/synaptics_i2c.c | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
| 19 | #include <linux/workqueue.h> | 19 | #include <linux/workqueue.h> |
| 20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
| 21 | #include <linux/pm.h> | ||
| 21 | 22 | ||
| 22 | #define DRIVER_NAME "synaptics_i2c" | 23 | #define DRIVER_NAME "synaptics_i2c" |
| 23 | /* maximum product id is 15 characters */ | 24 | /* maximum product id is 15 characters */ |
| @@ -619,8 +620,9 @@ static int __devexit synaptics_i2c_remove(struct i2c_client *client) | |||
| 619 | } | 620 | } |
| 620 | 621 | ||
| 621 | #ifdef CONFIG_PM | 622 | #ifdef CONFIG_PM |
| 622 | static int synaptics_i2c_suspend(struct i2c_client *client, pm_message_t mesg) | 623 | static int synaptics_i2c_suspend(struct device *dev) |
| 623 | { | 624 | { |
| 625 | struct i2c_client *client = to_i2c_client(dev); | ||
| 624 | struct synaptics_i2c *touch = i2c_get_clientdata(client); | 626 | struct synaptics_i2c *touch = i2c_get_clientdata(client); |
| 625 | 627 | ||
| 626 | cancel_delayed_work_sync(&touch->dwork); | 628 | cancel_delayed_work_sync(&touch->dwork); |
| @@ -631,9 +633,10 @@ static int synaptics_i2c_suspend(struct i2c_client *client, pm_message_t mesg) | |||
| 631 | return 0; | 633 | return 0; |
| 632 | } | 634 | } |
| 633 | 635 | ||
| 634 | static int synaptics_i2c_resume(struct i2c_client *client) | 636 | static int synaptics_i2c_resume(struct device *dev) |
| 635 | { | 637 | { |
| 636 | int ret; | 638 | int ret; |
| 639 | struct i2c_client *client = to_i2c_client(dev); | ||
| 637 | struct synaptics_i2c *touch = i2c_get_clientdata(client); | 640 | struct synaptics_i2c *touch = i2c_get_clientdata(client); |
| 638 | 641 | ||
| 639 | ret = synaptics_i2c_reset_config(client); | 642 | ret = synaptics_i2c_reset_config(client); |
| @@ -645,11 +648,11 @@ static int synaptics_i2c_resume(struct i2c_client *client) | |||
| 645 | 648 | ||
| 646 | return 0; | 649 | return 0; |
| 647 | } | 650 | } |
| 648 | #else | ||
| 649 | #define synaptics_i2c_suspend NULL | ||
| 650 | #define synaptics_i2c_resume NULL | ||
| 651 | #endif | 651 | #endif |
| 652 | 652 | ||
| 653 | static SIMPLE_DEV_PM_OPS(synaptics_i2c_pm, synaptics_i2c_suspend, | ||
| 654 | synaptics_i2c_resume); | ||
| 655 | |||
| 653 | static const struct i2c_device_id synaptics_i2c_id_table[] = { | 656 | static const struct i2c_device_id synaptics_i2c_id_table[] = { |
| 654 | { "synaptics_i2c", 0 }, | 657 | { "synaptics_i2c", 0 }, |
| 655 | { }, | 658 | { }, |
| @@ -660,13 +663,12 @@ static struct i2c_driver synaptics_i2c_driver = { | |||
| 660 | .driver = { | 663 | .driver = { |
| 661 | .name = DRIVER_NAME, | 664 | .name = DRIVER_NAME, |
| 662 | .owner = THIS_MODULE, | 665 | .owner = THIS_MODULE, |
| 666 | .pm = &synaptics_i2c_pm, | ||
| 663 | }, | 667 | }, |
| 664 | 668 | ||
| 665 | .probe = synaptics_i2c_probe, | 669 | .probe = synaptics_i2c_probe, |
| 666 | .remove = __devexit_p(synaptics_i2c_remove), | 670 | .remove = __devexit_p(synaptics_i2c_remove), |
| 667 | 671 | ||
| 668 | .suspend = synaptics_i2c_suspend, | ||
| 669 | .resume = synaptics_i2c_resume, | ||
| 670 | .id_table = synaptics_i2c_id_table, | 672 | .id_table = synaptics_i2c_id_table, |
| 671 | }; | 673 | }; |
| 672 | 674 | ||
