Thread (4 messages) 4 messages, 2 authors, 2011-12-07

Re: [PATCH v2] Driver for AUO In-Cell touchscreens using pixcir ICs

flat view

From: Heiko Stübner <heiko@sntech.de>
Date: 2011-12-07 14:31:24

Hi Dmitry,

thanks for the review

Am Dienstag, 6. Dezember 2011, 06:56:37 schrieb Dmitry Torokhov:
On Mon, Dec 05, 2011 at 09:05:30PM +0100, Heiko Stübner wrote:
quoted
Some displays from AUO have a so called in-cell touchscreen, meaning it
is built directly into the display unit.

Touchdata is gathered through PIXCIR Tango-ICs and processed in an
Atmel ATmega168P with custom firmware. Communication between the host
system and ATmega is done via I2C.

Devices using this touch solution include the Dell Streak5 and the family
of Qisda ebook readers.

The driver reports single- and multi-touch events including touch area
values.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
changes since v1: address comments from Christoph Fritz
(wrong type for error checks, wrong call to input_free_device)

 drivers/input/touchscreen/Kconfig         |   14 +
 drivers/input/touchscreen/Makefile        |    1 +
 drivers/input/touchscreen/auo-pixcir-ts.c |  656
 +++++++++++++++++++++++++++++ include/linux/input/auo-pixcir-ts.h      
 |   57 +++
 4 files changed, 728 insertions(+), 0 deletions(-)
 create mode 100644 drivers/input/touchscreen/auo-pixcir-ts.c
 create mode 100644 include/linux/input/auo-pixcir-ts.h
[ ... small corrections, thanks for finding them ... ]
quoted
+
+		for (i = 0; i < AUO_PIXCIR_REPORT_POINTS; i++) {
+			if (point[i].coord_x > 0 || point[i].coord_y > 0) {
+				input_report_abs(ts->input, ABS_MT_POSITION_X,
+						 point[i].coord_x);
+				input_report_abs(ts->input, ABS_MT_POSITION_Y,
+						 point[i].coord_y);
+				input_report_abs(ts->input, ABS_MT_TOUCH_MAJOR,
+						 point[i].area_major);
+				input_report_abs(ts->input, ABS_MT_TOUCH_MINOR,
+						 point[i].area_minor);
+				input_report_abs(ts->input, ABS_MT_ORIENTATION,
+						 point[i].orientation);
+				input_mt_sync(ts->input);
Is there a way to track the contacts and switch to protocol B by any
chance?
I'm not sure, but will check how the device handles changing the number of 
touching fingers and if it would be possible to switch.
quoted
+
+				/* use first finger as source for singletouch */
+				if (fingers == 0)
+					abs = i;
+
+				/* number of touch points could also be queried
+				 * via i2c but would require an additional call
+				 */
+				fingers++;
+			}
+		}
[ ... more small stuff for me to fix ... ]
quoted
+
+	ret = input_register_device(input_dev);
+	if (ret) {
+		dev_err(&client->dev, "could not register input device\n");
+		goto err_input_register;
+	}
+
+	input_set_drvdata(ts->input, ts);
Just do this earlier and then auo_pixcir_stop() is enough, you won't
need to call auo_pixcir_int_enable() before registering IRQ.
Just to be sure, you mean moving the input_set_drvdata before the irq-
registration?
quoted
+
+	i2c_set_clientdata(client, ts);
+
+	return 0;
+
[ ... and still more small stuff ]

Thanks
Heiko
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help