diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-04 18:42:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-04 18:42:30 -0400 |
commit | 8ce655e737dc395e115ecdce143a43b9b6127f46 (patch) | |
tree | dc7df27c0eb69d50f8a9971dca0b96f405538553 /drivers/input | |
parent | 999fd1ab344dabd9c985b638bf4c29495b8e4619 (diff) | |
parent | 3a4b4aaa546fa3d57b2ea7f41234f7d2e328da3f (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: wacom - add Cintiq 21UX2 and Intuos4 WL
Input: ads7846 - fix compiler warning in ads7846_probe()
Input: tps6507x-ts - a couple work queue cleanups
Input: s3c2410_ts - tone down logging
Input: s3c2410_ts - fix build error due to ADC Kconfig rename
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/tablet/wacom_sys.c | 1 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_wac.c | 73 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_wac.h | 1 | ||||
-rw-r--r-- | drivers/input/touchscreen/Kconfig | 2 | ||||
-rw-r--r-- | drivers/input/touchscreen/ads7846.c | 2 | ||||
-rw-r--r-- | drivers/input/touchscreen/s3c2410_ts.c | 2 | ||||
-rw-r--r-- | drivers/input/touchscreen/tps6507x-ts.c | 12 |
7 files changed, 67 insertions, 26 deletions
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 2dc0c07c0469..42ba3691d908 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c | |||
@@ -508,7 +508,6 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i | |||
508 | } | 508 | } |
509 | 509 | ||
510 | input_dev->name = wacom_wac->name; | 510 | input_dev->name = wacom_wac->name; |
511 | input_dev->name = wacom_wac->name; | ||
512 | input_dev->dev.parent = &intf->dev; | 511 | input_dev->dev.parent = &intf->dev; |
513 | input_dev->open = wacom_open; | 512 | input_dev->open = wacom_open; |
514 | input_dev->close = wacom_close; | 513 | input_dev->close = wacom_close; |
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 847fd0135bcf..d564af58175c 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
@@ -300,7 +300,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom) | |||
300 | case 0x823: /* Intuos3 Grip Pen */ | 300 | case 0x823: /* Intuos3 Grip Pen */ |
301 | case 0x813: /* Intuos3 Classic Pen */ | 301 | case 0x813: /* Intuos3 Classic Pen */ |
302 | case 0x885: /* Intuos3 Marker Pen */ | 302 | case 0x885: /* Intuos3 Marker Pen */ |
303 | case 0x802: /* Intuos4 Grip Pen Eraser */ | 303 | case 0x802: /* Intuos4 General Pen */ |
304 | case 0x804: /* Intuos4 Marker Pen */ | 304 | case 0x804: /* Intuos4 Marker Pen */ |
305 | case 0x40802: /* Intuos4 Classic Pen */ | 305 | case 0x40802: /* Intuos4 Classic Pen */ |
306 | case 0x022: | 306 | case 0x022: |
@@ -335,7 +335,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom) | |||
335 | case 0x81b: /* Intuos3 Classic Pen Eraser */ | 335 | case 0x81b: /* Intuos3 Classic Pen Eraser */ |
336 | case 0x91b: /* Intuos3 Airbrush Eraser */ | 336 | case 0x91b: /* Intuos3 Airbrush Eraser */ |
337 | case 0x80c: /* Intuos4 Marker Pen Eraser */ | 337 | case 0x80c: /* Intuos4 Marker Pen Eraser */ |
338 | case 0x80a: /* Intuos4 Grip Pen Eraser */ | 338 | case 0x80a: /* Intuos4 General Pen Eraser */ |
339 | case 0x4080a: /* Intuos4 Classic Pen Eraser */ | 339 | case 0x4080a: /* Intuos4 Classic Pen Eraser */ |
340 | case 0x90a: /* Intuos4 Airbrush Eraser */ | 340 | case 0x90a: /* Intuos4 Airbrush Eraser */ |
341 | wacom->tool[idx] = BTN_TOOL_RUBBER; | 341 | wacom->tool[idx] = BTN_TOOL_RUBBER; |
@@ -356,6 +356,11 @@ static int wacom_intuos_inout(struct wacom_wac *wacom) | |||
356 | return 1; | 356 | return 1; |
357 | } | 357 | } |
358 | 358 | ||
359 | /* older I4 styli don't work with new Cintiqs */ | ||
360 | if (!((wacom->id[idx] >> 20) & 0x01) && | ||
361 | (features->type == WACOM_21UX2)) | ||
362 | return 1; | ||
363 | |||
359 | /* Exit report */ | 364 | /* Exit report */ |
360 | if ((data[1] & 0xfe) == 0x80) { | 365 | if ((data[1] & 0xfe) == 0x80) { |
361 | /* | 366 | /* |
@@ -474,21 +479,43 @@ static int wacom_intuos_irq(struct wacom_wac *wacom) | |||
474 | input_report_abs(input, ABS_MISC, 0); | 479 | input_report_abs(input, ABS_MISC, 0); |
475 | } | 480 | } |
476 | } else { | 481 | } else { |
477 | input_report_key(input, BTN_0, (data[5] & 0x01)); | 482 | if (features->type == WACOM_21UX2) { |
478 | input_report_key(input, BTN_1, (data[5] & 0x02)); | 483 | input_report_key(input, BTN_0, (data[5] & 0x01)); |
479 | input_report_key(input, BTN_2, (data[5] & 0x04)); | 484 | input_report_key(input, BTN_1, (data[6] & 0x01)); |
480 | input_report_key(input, BTN_3, (data[5] & 0x08)); | 485 | input_report_key(input, BTN_2, (data[6] & 0x02)); |
481 | input_report_key(input, BTN_4, (data[6] & 0x01)); | 486 | input_report_key(input, BTN_3, (data[6] & 0x04)); |
482 | input_report_key(input, BTN_5, (data[6] & 0x02)); | 487 | input_report_key(input, BTN_4, (data[6] & 0x08)); |
483 | input_report_key(input, BTN_6, (data[6] & 0x04)); | 488 | input_report_key(input, BTN_5, (data[6] & 0x10)); |
484 | input_report_key(input, BTN_7, (data[6] & 0x08)); | 489 | input_report_key(input, BTN_6, (data[6] & 0x20)); |
485 | input_report_key(input, BTN_8, (data[5] & 0x10)); | 490 | input_report_key(input, BTN_7, (data[6] & 0x40)); |
486 | input_report_key(input, BTN_9, (data[6] & 0x10)); | 491 | input_report_key(input, BTN_8, (data[6] & 0x80)); |
492 | input_report_key(input, BTN_9, (data[7] & 0x01)); | ||
493 | input_report_key(input, BTN_A, (data[8] & 0x01)); | ||
494 | input_report_key(input, BTN_B, (data[8] & 0x02)); | ||
495 | input_report_key(input, BTN_C, (data[8] & 0x04)); | ||
496 | input_report_key(input, BTN_X, (data[8] & 0x08)); | ||
497 | input_report_key(input, BTN_Y, (data[8] & 0x10)); | ||
498 | input_report_key(input, BTN_Z, (data[8] & 0x20)); | ||
499 | input_report_key(input, BTN_BASE, (data[8] & 0x40)); | ||
500 | input_report_key(input, BTN_BASE2, (data[8] & 0x80)); | ||
501 | } else { | ||
502 | input_report_key(input, BTN_0, (data[5] & 0x01)); | ||
503 | input_report_key(input, BTN_1, (data[5] & 0x02)); | ||
504 | input_report_key(input, BTN_2, (data[5] & 0x04)); | ||
505 | input_report_key(input, BTN_3, (data[5] & 0x08)); | ||
506 | input_report_key(input, BTN_4, (data[6] & 0x01)); | ||
507 | input_report_key(input, BTN_5, (data[6] & 0x02)); | ||
508 | input_report_key(input, BTN_6, (data[6] & 0x04)); | ||
509 | input_report_key(input, BTN_7, (data[6] & 0x08)); | ||
510 | input_report_key(input, BTN_8, (data[5] & 0x10)); | ||
511 | input_report_key(input, BTN_9, (data[6] & 0x10)); | ||
512 | } | ||
487 | input_report_abs(input, ABS_RX, ((data[1] & 0x1f) << 8) | data[2]); | 513 | input_report_abs(input, ABS_RX, ((data[1] & 0x1f) << 8) | data[2]); |
488 | input_report_abs(input, ABS_RY, ((data[3] & 0x1f) << 8) | data[4]); | 514 | input_report_abs(input, ABS_RY, ((data[3] & 0x1f) << 8) | data[4]); |
489 | 515 | ||
490 | if ((data[5] & 0x1f) | (data[6] & 0x1f) | (data[1] & 0x1f) | | 516 | if ((data[5] & 0x1f) | (data[6] & 0x1f) | (data[1] & 0x1f) | |
491 | data[2] | (data[3] & 0x1f) | data[4]) { | 517 | data[2] | (data[3] & 0x1f) | data[4] | data[8] | |
518 | (data[7] & 0x01)) { | ||
492 | input_report_key(input, wacom->tool[1], 1); | 519 | input_report_key(input, wacom->tool[1], 1); |
493 | input_report_abs(input, ABS_MISC, PAD_DEVICE_ID); | 520 | input_report_abs(input, ABS_MISC, PAD_DEVICE_ID); |
494 | } else { | 521 | } else { |
@@ -640,7 +667,7 @@ static void wacom_tpc_finger_in(struct wacom_wac *wacom, char *data, int idx) | |||
640 | if (!idx) | 667 | if (!idx) |
641 | input_report_key(input, BTN_TOUCH, 1); | 668 | input_report_key(input, BTN_TOUCH, 1); |
642 | input_event(input, EV_MSC, MSC_SERIAL, finger); | 669 | input_event(input, EV_MSC, MSC_SERIAL, finger); |
643 | input_sync(wacom->input); | 670 | input_sync(input); |
644 | 671 | ||
645 | wacom->last_finger = finger; | 672 | wacom->last_finger = finger; |
646 | } | 673 | } |
@@ -826,6 +853,7 @@ void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len) | |||
826 | case INTUOS4L: | 853 | case INTUOS4L: |
827 | case CINTIQ: | 854 | case CINTIQ: |
828 | case WACOM_BEE: | 855 | case WACOM_BEE: |
856 | case WACOM_21UX2: | ||
829 | sync = wacom_intuos_irq(wacom_wac); | 857 | sync = wacom_intuos_irq(wacom_wac); |
830 | break; | 858 | break; |
831 | 859 | ||
@@ -921,6 +949,17 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, | |||
921 | __set_bit(BTN_STYLUS2, input_dev->keybit); | 949 | __set_bit(BTN_STYLUS2, input_dev->keybit); |
922 | break; | 950 | break; |
923 | 951 | ||
952 | case WACOM_21UX2: | ||
953 | __set_bit(BTN_A, input_dev->keybit); | ||
954 | __set_bit(BTN_B, input_dev->keybit); | ||
955 | __set_bit(BTN_C, input_dev->keybit); | ||
956 | __set_bit(BTN_X, input_dev->keybit); | ||
957 | __set_bit(BTN_Y, input_dev->keybit); | ||
958 | __set_bit(BTN_Z, input_dev->keybit); | ||
959 | __set_bit(BTN_BASE, input_dev->keybit); | ||
960 | __set_bit(BTN_BASE2, input_dev->keybit); | ||
961 | /* fall through */ | ||
962 | |||
924 | case WACOM_BEE: | 963 | case WACOM_BEE: |
925 | __set_bit(BTN_8, input_dev->keybit); | 964 | __set_bit(BTN_8, input_dev->keybit); |
926 | __set_bit(BTN_9, input_dev->keybit); | 965 | __set_bit(BTN_9, input_dev->keybit); |
@@ -1105,6 +1144,8 @@ static const struct wacom_features wacom_features_0xBA = | |||
1105 | { "Wacom Intuos4 8x13", WACOM_PKGLEN_INTUOS, 65024, 40640, 2047, 63, INTUOS4L }; | 1144 | { "Wacom Intuos4 8x13", WACOM_PKGLEN_INTUOS, 65024, 40640, 2047, 63, INTUOS4L }; |
1106 | static const struct wacom_features wacom_features_0xBB = | 1145 | static const struct wacom_features wacom_features_0xBB = |
1107 | { "Wacom Intuos4 12x19", WACOM_PKGLEN_INTUOS, 97536, 60960, 2047, 63, INTUOS4L }; | 1146 | { "Wacom Intuos4 12x19", WACOM_PKGLEN_INTUOS, 97536, 60960, 2047, 63, INTUOS4L }; |
1147 | static const struct wacom_features wacom_features_0xBC = | ||
1148 | { "Wacom Intuos4 WL", WACOM_PKGLEN_INTUOS, 40840, 25400, 2047, 63, INTUOS4 }; | ||
1108 | static const struct wacom_features wacom_features_0x3F = | 1149 | static const struct wacom_features wacom_features_0x3F = |
1109 | { "Wacom Cintiq 21UX", WACOM_PKGLEN_INTUOS, 87200, 65600, 1023, 63, CINTIQ }; | 1150 | { "Wacom Cintiq 21UX", WACOM_PKGLEN_INTUOS, 87200, 65600, 1023, 63, CINTIQ }; |
1110 | static const struct wacom_features wacom_features_0xC5 = | 1151 | static const struct wacom_features wacom_features_0xC5 = |
@@ -1113,6 +1154,8 @@ static const struct wacom_features wacom_features_0xC6 = | |||
1113 | { "Wacom Cintiq 12WX", WACOM_PKGLEN_INTUOS, 53020, 33440, 1023, 63, WACOM_BEE }; | 1154 | { "Wacom Cintiq 12WX", WACOM_PKGLEN_INTUOS, 53020, 33440, 1023, 63, WACOM_BEE }; |
1114 | static const struct wacom_features wacom_features_0xC7 = | 1155 | static const struct wacom_features wacom_features_0xC7 = |
1115 | { "Wacom DTU1931", WACOM_PKGLEN_GRAPHIRE, 37832, 30305, 511, 0, PL }; | 1156 | { "Wacom DTU1931", WACOM_PKGLEN_GRAPHIRE, 37832, 30305, 511, 0, PL }; |
1157 | static const struct wacom_features wacom_features_0xCC = | ||
1158 | { "Wacom Cintiq 21UX2", WACOM_PKGLEN_INTUOS, 87200, 65600, 2047, 63, WACOM_21UX2 }; | ||
1116 | static const struct wacom_features wacom_features_0x90 = | 1159 | static const struct wacom_features wacom_features_0x90 = |
1117 | { "Wacom ISDv4 90", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, 0, TABLETPC }; | 1160 | { "Wacom ISDv4 90", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, 0, TABLETPC }; |
1118 | static const struct wacom_features wacom_features_0x93 = | 1161 | static const struct wacom_features wacom_features_0x93 = |
@@ -1185,10 +1228,12 @@ const struct usb_device_id wacom_ids[] = { | |||
1185 | { USB_DEVICE_WACOM(0xB9) }, | 1228 | { USB_DEVICE_WACOM(0xB9) }, |
1186 | { USB_DEVICE_WACOM(0xBA) }, | 1229 | { USB_DEVICE_WACOM(0xBA) }, |
1187 | { USB_DEVICE_WACOM(0xBB) }, | 1230 | { USB_DEVICE_WACOM(0xBB) }, |
1231 | { USB_DEVICE_WACOM(0xBC) }, | ||
1188 | { USB_DEVICE_WACOM(0x3F) }, | 1232 | { USB_DEVICE_WACOM(0x3F) }, |
1189 | { USB_DEVICE_WACOM(0xC5) }, | 1233 | { USB_DEVICE_WACOM(0xC5) }, |
1190 | { USB_DEVICE_WACOM(0xC6) }, | 1234 | { USB_DEVICE_WACOM(0xC6) }, |
1191 | { USB_DEVICE_WACOM(0xC7) }, | 1235 | { USB_DEVICE_WACOM(0xC7) }, |
1236 | { USB_DEVICE_WACOM(0xCC) }, | ||
1192 | { USB_DEVICE_WACOM(0x90) }, | 1237 | { USB_DEVICE_WACOM(0x90) }, |
1193 | { USB_DEVICE_WACOM(0x93) }, | 1238 | { USB_DEVICE_WACOM(0x93) }, |
1194 | { USB_DEVICE_WACOM(0x9A) }, | 1239 | { USB_DEVICE_WACOM(0x9A) }, |
diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h index 063f1af3204f..854b92092dfc 100644 --- a/drivers/input/tablet/wacom_wac.h +++ b/drivers/input/tablet/wacom_wac.h | |||
@@ -50,6 +50,7 @@ enum { | |||
50 | INTUOS4S, | 50 | INTUOS4S, |
51 | INTUOS4, | 51 | INTUOS4, |
52 | INTUOS4L, | 52 | INTUOS4L, |
53 | WACOM_21UX2, | ||
53 | CINTIQ, | 54 | CINTIQ, |
54 | WACOM_BEE, | 55 | WACOM_BEE, |
55 | WACOM_MO, | 56 | WACOM_MO, |
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index 6703c6b9800a..3b9d5e2105d7 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig | |||
@@ -156,7 +156,7 @@ config TOUCHSCREEN_FUJITSU | |||
156 | config TOUCHSCREEN_S3C2410 | 156 | config TOUCHSCREEN_S3C2410 |
157 | tristate "Samsung S3C2410/generic touchscreen input driver" | 157 | tristate "Samsung S3C2410/generic touchscreen input driver" |
158 | depends on ARCH_S3C2410 || SAMSUNG_DEV_TS | 158 | depends on ARCH_S3C2410 || SAMSUNG_DEV_TS |
159 | select S3C24XX_ADC | 159 | select S3C_ADC |
160 | help | 160 | help |
161 | Say Y here if you have the s3c2410 touchscreen. | 161 | Say Y here if you have the s3c2410 touchscreen. |
162 | 162 | ||
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 634f6f6b9b13..a9fdf55c0238 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c | |||
@@ -1164,7 +1164,7 @@ static int __devinit ads7846_probe(struct spi_device *spi) | |||
1164 | ts->reg = regulator_get(&spi->dev, "vcc"); | 1164 | ts->reg = regulator_get(&spi->dev, "vcc"); |
1165 | if (IS_ERR(ts->reg)) { | 1165 | if (IS_ERR(ts->reg)) { |
1166 | err = PTR_ERR(ts->reg); | 1166 | err = PTR_ERR(ts->reg); |
1167 | dev_err(&spi->dev, "unable to get regulator: %ld\n", err); | 1167 | dev_err(&spi->dev, "unable to get regulator: %d\n", err); |
1168 | goto err_free_gpio; | 1168 | goto err_free_gpio; |
1169 | } | 1169 | } |
1170 | 1170 | ||
diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c index ac5d0f9b0cb1..6085d12fd561 100644 --- a/drivers/input/touchscreen/s3c2410_ts.c +++ b/drivers/input/touchscreen/s3c2410_ts.c | |||
@@ -173,7 +173,7 @@ static irqreturn_t stylus_irq(int irq, void *dev_id) | |||
173 | if (down) | 173 | if (down) |
174 | s3c_adc_start(ts.client, 0, 1 << ts.shift); | 174 | s3c_adc_start(ts.client, 0, 1 << ts.shift); |
175 | else | 175 | else |
176 | dev_info(ts.dev, "%s: count=%d\n", __func__, ts.count); | 176 | dev_dbg(ts.dev, "%s: count=%d\n", __func__, ts.count); |
177 | 177 | ||
178 | if (ts.features & FEAT_PEN_IRQ) { | 178 | if (ts.features & FEAT_PEN_IRQ) { |
179 | /* Clear pen down/up interrupt */ | 179 | /* Clear pen down/up interrupt */ |
diff --git a/drivers/input/touchscreen/tps6507x-ts.c b/drivers/input/touchscreen/tps6507x-ts.c index 5de80a1a730b..5b70a1419b4d 100644 --- a/drivers/input/touchscreen/tps6507x-ts.c +++ b/drivers/input/touchscreen/tps6507x-ts.c | |||
@@ -221,7 +221,7 @@ done: | |||
221 | 221 | ||
222 | if (poll) { | 222 | if (poll) { |
223 | schd = queue_delayed_work(tsc->wq, &tsc->work, | 223 | schd = queue_delayed_work(tsc->wq, &tsc->work, |
224 | tsc->poll_period * HZ / 1000); | 224 | msecs_to_jiffies(tsc->poll_period)); |
225 | if (schd) | 225 | if (schd) |
226 | tsc->polling = 1; | 226 | tsc->polling = 1; |
227 | else { | 227 | else { |
@@ -326,7 +326,7 @@ static int tps6507x_ts_probe(struct platform_device *pdev) | |||
326 | goto err2; | 326 | goto err2; |
327 | 327 | ||
328 | schd = queue_delayed_work(tsc->wq, &tsc->work, | 328 | schd = queue_delayed_work(tsc->wq, &tsc->work, |
329 | tsc->poll_period * HZ / 1000); | 329 | msecs_to_jiffies(tsc->poll_period)); |
330 | 330 | ||
331 | if (schd) | 331 | if (schd) |
332 | tsc->polling = 1; | 332 | tsc->polling = 1; |
@@ -339,10 +339,8 @@ static int tps6507x_ts_probe(struct platform_device *pdev) | |||
339 | return 0; | 339 | return 0; |
340 | 340 | ||
341 | err2: | 341 | err2: |
342 | cancel_delayed_work(&tsc->work); | 342 | cancel_delayed_work_sync(&tsc->work); |
343 | flush_workqueue(tsc->wq); | ||
344 | destroy_workqueue(tsc->wq); | 343 | destroy_workqueue(tsc->wq); |
345 | tsc->wq = 0; | ||
346 | input_free_device(input_dev); | 344 | input_free_device(input_dev); |
347 | err1: | 345 | err1: |
348 | kfree(tsc); | 346 | kfree(tsc); |
@@ -360,10 +358,8 @@ static int __devexit tps6507x_ts_remove(struct platform_device *pdev) | |||
360 | if (!tsc) | 358 | if (!tsc) |
361 | return 0; | 359 | return 0; |
362 | 360 | ||
363 | cancel_delayed_work(&tsc->work); | 361 | cancel_delayed_work_sync(&tsc->work); |
364 | flush_workqueue(tsc->wq); | ||
365 | destroy_workqueue(tsc->wq); | 362 | destroy_workqueue(tsc->wq); |
366 | tsc->wq = 0; | ||
367 | 363 | ||
368 | input_free_device(input_dev); | 364 | input_free_device(input_dev); |
369 | 365 | ||