From 829ab5b52b7ee1d92b2373662b82b6f38cae7166 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Mon, 31 May 2010 11:57:24 -0700 Subject: Input: s3c2410_ts - fix build error due to ADC Kconfig rename The name of the Kconfig symbol for the ADC has changed as a result of application to more SoCs but the select statement has not been updated, causing linker failures as the ADC core has not been built. Signed-off-by: Mark Brown Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index 6703c6b9800..3b9d5e2105d 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -156,7 +156,7 @@ config TOUCHSCREEN_FUJITSU config TOUCHSCREEN_S3C2410 tristate "Samsung S3C2410/generic touchscreen input driver" depends on ARCH_S3C2410 || SAMSUNG_DEV_TS - select S3C24XX_ADC + select S3C_ADC help Say Y here if you have the s3c2410 touchscreen. -- cgit v1.2.3 From fbf89f25fc4dc68ba0857aca87e70fa5d2592d81 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Mon, 31 May 2010 11:57:24 -0700 Subject: Input: s3c2410_ts - tone down logging The S3C touchscreen driver is logging at LOG_INFO on every stylus up event which spams the console needlessly. Reduce the priority of the message to debug level for some peace and quiet. Signed-off-by: Mark Brown Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/s3c2410_ts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c index ac5d0f9b0cb..6085d12fd56 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) if (down) s3c_adc_start(ts.client, 0, 1 << ts.shift); else - dev_info(ts.dev, "%s: count=%d\n", __func__, ts.count); + dev_dbg(ts.dev, "%s: count=%d\n", __func__, ts.count); if (ts.features & FEAT_PEN_IRQ) { /* Clear pen down/up interrupt */ -- cgit v1.2.3 From f7a2e30246281944064113dafbafe3eb14cd89e3 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 1 Jun 2010 21:29:40 -0700 Subject: Input: tps6507x-ts - a couple work queue cleanups 1) Use msecs_to_jiffies() instead of calculating by hand. 2) Call cancel_delayed_work_sync() instead of cancel_delayed_work() followed by a separate flush_workqueue(). 3) Remove the "tsc->wq = 0;" Sparse complains about that because tsc->wq is a pointer, not an int. It's not needed because we just free the pointer anyway. Signed-off-by: Dan Carpenter Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/tps6507x-ts.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'drivers') diff --git a/drivers/input/touchscreen/tps6507x-ts.c b/drivers/input/touchscreen/tps6507x-ts.c index 5de80a1a730..5b70a1419b4 100644 --- a/drivers/input/touchscreen/tps6507x-ts.c +++ b/drivers/input/touchscreen/tps6507x-ts.c @@ -221,7 +221,7 @@ done: if (poll) { schd = queue_delayed_work(tsc->wq, &tsc->work, - tsc->poll_period * HZ / 1000); + msecs_to_jiffies(tsc->poll_period)); if (schd) tsc->polling = 1; else { @@ -326,7 +326,7 @@ static int tps6507x_ts_probe(struct platform_device *pdev) goto err2; schd = queue_delayed_work(tsc->wq, &tsc->work, - tsc->poll_period * HZ / 1000); + msecs_to_jiffies(tsc->poll_period)); if (schd) tsc->polling = 1; @@ -339,10 +339,8 @@ static int tps6507x_ts_probe(struct platform_device *pdev) return 0; err2: - cancel_delayed_work(&tsc->work); - flush_workqueue(tsc->wq); + cancel_delayed_work_sync(&tsc->work); destroy_workqueue(tsc->wq); - tsc->wq = 0; input_free_device(input_dev); err1: kfree(tsc); @@ -360,10 +358,8 @@ static int __devexit tps6507x_ts_remove(struct platform_device *pdev) if (!tsc) return 0; - cancel_delayed_work(&tsc->work); - flush_workqueue(tsc->wq); + cancel_delayed_work_sync(&tsc->work); destroy_workqueue(tsc->wq); - tsc->wq = 0; input_free_device(input_dev); -- cgit v1.2.3 From 56960b3602be6fde9f09c7958fa06b26384307cc Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Wed, 2 Jun 2010 00:40:06 -0700 Subject: Input: ads7846 - fix compiler warning in ads7846_probe() This patch fixes the follwing warning introduced by commit 067fb2f648543894ce775082c5636f4c32b99e4f ("Input: ads7846 - return error on regulator_get() failure"): drivers/input/touchscreen/ads7846.c: In function 'ads7846_probe': drivers/input/touchscreen/ads7846.c:1167: warning: format '%ld' expects type 'long int', but argument 4 has type 'int' Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/ads7846.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 634f6f6b9b1..a9fdf55c023 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) ts->reg = regulator_get(&spi->dev, "vcc"); if (IS_ERR(ts->reg)) { err = PTR_ERR(ts->reg); - dev_err(&spi->dev, "unable to get regulator: %ld\n", err); + dev_err(&spi->dev, "unable to get regulator: %d\n", err); goto err_free_gpio; } -- cgit v1.2.3 From 3a4b4aaa546fa3d57b2ea7f41234f7d2e328da3f Mon Sep 17 00:00:00 2001 From: Ping Cheng Date: Thu, 3 Jun 2010 22:10:21 -0700 Subject: Input: wacom - add Cintiq 21UX2 and Intuos4 WL Signed-off-by: Ping Cheng Signed-off-by: Dmitry Torokhov --- drivers/input/tablet/wacom_sys.c | 1 - drivers/input/tablet/wacom_wac.c | 73 ++++++++++++++++++++++++++++++++-------- drivers/input/tablet/wacom_wac.h | 1 + 3 files changed, 60 insertions(+), 15 deletions(-) (limited to 'drivers') diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 2dc0c07c046..42ba3691d90 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c @@ -507,7 +507,6 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i goto fail3; } - input_dev->name = wacom_wac->name; input_dev->name = wacom_wac->name; input_dev->dev.parent = &intf->dev; input_dev->open = wacom_open; diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 847fd0135bc..d564af58175 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) case 0x823: /* Intuos3 Grip Pen */ case 0x813: /* Intuos3 Classic Pen */ case 0x885: /* Intuos3 Marker Pen */ - case 0x802: /* Intuos4 Grip Pen Eraser */ + case 0x802: /* Intuos4 General Pen */ case 0x804: /* Intuos4 Marker Pen */ case 0x40802: /* Intuos4 Classic Pen */ case 0x022: @@ -335,7 +335,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom) case 0x81b: /* Intuos3 Classic Pen Eraser */ case 0x91b: /* Intuos3 Airbrush Eraser */ case 0x80c: /* Intuos4 Marker Pen Eraser */ - case 0x80a: /* Intuos4 Grip Pen Eraser */ + case 0x80a: /* Intuos4 General Pen Eraser */ case 0x4080a: /* Intuos4 Classic Pen Eraser */ case 0x90a: /* Intuos4 Airbrush Eraser */ wacom->tool[idx] = BTN_TOOL_RUBBER; @@ -356,6 +356,11 @@ static int wacom_intuos_inout(struct wacom_wac *wacom) return 1; } + /* older I4 styli don't work with new Cintiqs */ + if (!((wacom->id[idx] >> 20) & 0x01) && + (features->type == WACOM_21UX2)) + return 1; + /* Exit report */ if ((data[1] & 0xfe) == 0x80) { /* @@ -474,21 +479,43 @@ static int wacom_intuos_irq(struct wacom_wac *wacom) input_report_abs(input, ABS_MISC, 0); } } else { - input_report_key(input, BTN_0, (data[5] & 0x01)); - input_report_key(input, BTN_1, (data[5] & 0x02)); - input_report_key(input, BTN_2, (data[5] & 0x04)); - input_report_key(input, BTN_3, (data[5] & 0x08)); - input_report_key(input, BTN_4, (data[6] & 0x01)); - input_report_key(input, BTN_5, (data[6] & 0x02)); - input_report_key(input, BTN_6, (data[6] & 0x04)); - input_report_key(input, BTN_7, (data[6] & 0x08)); - input_report_key(input, BTN_8, (data[5] & 0x10)); - input_report_key(input, BTN_9, (data[6] & 0x10)); + if (features->type == WACOM_21UX2) { + input_report_key(input, BTN_0, (data[5] & 0x01)); + input_report_key(input, BTN_1, (data[6] & 0x01)); + input_report_key(input, BTN_2, (data[6] & 0x02)); + input_report_key(input, BTN_3, (data[6] & 0x04)); + input_report_key(input, BTN_4, (data[6] & 0x08)); + input_report_key(input, BTN_5, (data[6] & 0x10)); + input_report_key(input, BTN_6, (data[6] & 0x20)); + input_report_key(input, BTN_7, (data[6] & 0x40)); + input_report_key(input, BTN_8, (data[6] & 0x80)); + input_report_key(input, BTN_9, (data[7] & 0x01)); + input_report_key(input, BTN_A, (data[8] & 0x01)); + input_report_key(input, BTN_B, (data[8] & 0x02)); + input_report_key(input, BTN_C, (data[8] & 0x04)); + input_report_key(input, BTN_X, (data[8] & 0x08)); + input_report_key(input, BTN_Y, (data[8] & 0x10)); + input_report_key(input, BTN_Z, (data[8] & 0x20)); + input_report_key(input, BTN_BASE, (data[8] & 0x40)); + input_report_key(input, BTN_BASE2, (data[8] & 0x80)); + } else { + input_report_key(input, BTN_0, (data[5] & 0x01)); + input_report_key(input, BTN_1, (data[5] & 0x02)); + input_report_key(input, BTN_2, (data[5] & 0x04)); + input_report_key(input, BTN_3, (data[5] & 0x08)); + input_report_key(input, BTN_4, (data[6] & 0x01)); + input_report_key(input, BTN_5, (data[6] & 0x02)); + input_report_key(input, BTN_6, (data[6] & 0x04)); + input_report_key(input, BTN_7, (data[6] & 0x08)); + input_report_key(input, BTN_8, (data[5] & 0x10)); + input_report_key(input, BTN_9, (data[6] & 0x10)); + } input_report_abs(input, ABS_RX, ((data[1] & 0x1f) << 8) | data[2]); input_report_abs(input, ABS_RY, ((data[3] & 0x1f) << 8) | data[4]); if ((data[5] & 0x1f) | (data[6] & 0x1f) | (data[1] & 0x1f) | - data[2] | (data[3] & 0x1f) | data[4]) { + data[2] | (data[3] & 0x1f) | data[4] | data[8] | + (data[7] & 0x01)) { input_report_key(input, wacom->tool[1], 1); input_report_abs(input, ABS_MISC, PAD_DEVICE_ID); } else { @@ -640,7 +667,7 @@ static void wacom_tpc_finger_in(struct wacom_wac *wacom, char *data, int idx) if (!idx) input_report_key(input, BTN_TOUCH, 1); input_event(input, EV_MSC, MSC_SERIAL, finger); - input_sync(wacom->input); + input_sync(input); wacom->last_finger = finger; } @@ -826,6 +853,7 @@ void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len) case INTUOS4L: case CINTIQ: case WACOM_BEE: + case WACOM_21UX2: sync = wacom_intuos_irq(wacom_wac); break; @@ -921,6 +949,17 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, __set_bit(BTN_STYLUS2, input_dev->keybit); break; + case WACOM_21UX2: + __set_bit(BTN_A, input_dev->keybit); + __set_bit(BTN_B, input_dev->keybit); + __set_bit(BTN_C, input_dev->keybit); + __set_bit(BTN_X, input_dev->keybit); + __set_bit(BTN_Y, input_dev->keybit); + __set_bit(BTN_Z, input_dev->keybit); + __set_bit(BTN_BASE, input_dev->keybit); + __set_bit(BTN_BASE2, input_dev->keybit); + /* fall through */ + case WACOM_BEE: __set_bit(BTN_8, input_dev->keybit); __set_bit(BTN_9, input_dev->keybit); @@ -1105,6 +1144,8 @@ static const struct wacom_features wacom_features_0xBA = { "Wacom Intuos4 8x13", WACOM_PKGLEN_INTUOS, 65024, 40640, 2047, 63, INTUOS4L }; static const struct wacom_features wacom_features_0xBB = { "Wacom Intuos4 12x19", WACOM_PKGLEN_INTUOS, 97536, 60960, 2047, 63, INTUOS4L }; +static const struct wacom_features wacom_features_0xBC = + { "Wacom Intuos4 WL", WACOM_PKGLEN_INTUOS, 40840, 25400, 2047, 63, INTUOS4 }; static const struct wacom_features wacom_features_0x3F = { "Wacom Cintiq 21UX", WACOM_PKGLEN_INTUOS, 87200, 65600, 1023, 63, CINTIQ }; static const struct wacom_features wacom_features_0xC5 = @@ -1113,6 +1154,8 @@ static const struct wacom_features wacom_features_0xC6 = { "Wacom Cintiq 12WX", WACOM_PKGLEN_INTUOS, 53020, 33440, 1023, 63, WACOM_BEE }; static const struct wacom_features wacom_features_0xC7 = { "Wacom DTU1931", WACOM_PKGLEN_GRAPHIRE, 37832, 30305, 511, 0, PL }; +static const struct wacom_features wacom_features_0xCC = + { "Wacom Cintiq 21UX2", WACOM_PKGLEN_INTUOS, 87200, 65600, 2047, 63, WACOM_21UX2 }; static const struct wacom_features wacom_features_0x90 = { "Wacom ISDv4 90", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, 0, TABLETPC }; static const struct wacom_features wacom_features_0x93 = @@ -1185,10 +1228,12 @@ const struct usb_device_id wacom_ids[] = { { USB_DEVICE_WACOM(0xB9) }, { USB_DEVICE_WACOM(0xBA) }, { USB_DEVICE_WACOM(0xBB) }, + { USB_DEVICE_WACOM(0xBC) }, { USB_DEVICE_WACOM(0x3F) }, { USB_DEVICE_WACOM(0xC5) }, { USB_DEVICE_WACOM(0xC6) }, { USB_DEVICE_WACOM(0xC7) }, + { USB_DEVICE_WACOM(0xCC) }, { USB_DEVICE_WACOM(0x90) }, { USB_DEVICE_WACOM(0x93) }, { USB_DEVICE_WACOM(0x9A) }, diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h index 063f1af3204..854b92092df 100644 --- a/drivers/input/tablet/wacom_wac.h +++ b/drivers/input/tablet/wacom_wac.h @@ -50,6 +50,7 @@ enum { INTUOS4S, INTUOS4, INTUOS4L, + WACOM_21UX2, CINTIQ, WACOM_BEE, WACOM_MO, -- cgit v1.2.3