Skip to contentSkip to conversation

Input: add driver for Neonode zForce based touchscreens

PATCH Superseded Heiko Stübner 1 participant 3 messages Sep 6, 2013 – Oct 7, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Input: add driver for Neonode zForce based touchscreens

This adds a driver for touchscreens using the zforce infrared technology from Neonode connected via i2c to the host system.

It supports multitouch with up to two fingers and tracking of the contacts in hardware.

---
changes since v1:
- address comments from Dmitry Torokhov
but I kept the access_mutex due to the possible race I described in the mail:
- touch -> interrupt
- isr reads first packet
- user closes device -> stop command sent
- isr reads payload
- address comments from Henrik Rydberg, letting the input system collect singletouch from the multitouch data using the appropriate functions

 drivers/input/touchscreen/Kconfig       |   13 +
 drivers/input/touchscreen/Makefile      |    1 +
 drivers/input/touchscreen/zforce_ts.c   |  826 +++++++++++++++++++++++++++++++
 include/linux/platform_data/zforce_ts.h |   26 +
 4 files changed, 866 insertions(+)
 create mode 100644 drivers/input/touchscreen/zforce_ts.c
 create mode 100644 include/linux/platform_data/zforce_ts.h
drivers/input/touchscreen/Kconfig +13 -0
index 3b9758b..ade11b7 100644
@@ -919,4 +919,17 @@ config TOUCHSCREEN_TPS6507X
 	  To compile this driver as a module, choose M here: the
 	  module will be called tps6507x_ts.
 
+config TOUCHSCREEN_ZFORCE
+	tristate "Neonode zForce infrared touchscreens"
+	depends on I2C
+	depends on GPIOLIB
+	help
+	  Say Y here if you have a touchscreen using the zforce
+	  infraread technology from Neonode.
+
+	  If unsure, say N.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called zforce_ts.
+
 endif
drivers/input/touchscreen/Makefile +1 -0
index f5216c1..7587883 100644
@@ -75,3 +75,4 @@ obj-$(CONFIG_TOUCHSCREEN_WM97XX_MAINSTONE)	+= mainstone-wm97xx.o
 obj-$(CONFIG_TOUCHSCREEN_WM97XX_ZYLONITE)	+= zylonite-wm97xx.o
 obj-$(CONFIG_TOUCHSCREEN_W90X900)	+= w90p910_ts.o
 obj-$(CONFIG_TOUCHSCREEN_TPS6507X)	+= tps6507x-ts.o
+obj-$(CONFIG_TOUCHSCREEN_ZFORCE)	+= zforce_ts.o
drivers/input/touchscreen/zforce_ts.c new file +826 -0

826 lines not on this page · raw message

include/linux/platform_data/zforce_ts.h new file +26 -0
new file mode 100644
index 0000000..0472ab2
@@ -0,0 +1,26 @@
+/* drivers/input/touchscreen/zforce.c
+ *
+ * Copyright (C) 2012-2013 MundoReader S.L.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _LINUX_INPUT_ZFORCE_TS_H
+#define _LINUX_INPUT_ZFORCE_TS_H
+
+struct zforce_ts_platdata {
+	int gpio_int;
+	int gpio_rst;
+
+	unsigned int x_max;
+	unsigned int y_max;
+};
+
+#endif /* _LINUX_INPUT_ZFORCE_TS_H */
Signature · 1 line
1.7.10.4
#1 lore raw

Am Samstag, 7. September 2013, 01:33:11 schrieb Heiko Stübner:

Quoted 7 lines

This adds a driver for touchscreens using the zforce infrared technology from Neonode connected via i2c to the host system.

It supports multitouch with up to two fingers and tracking of the contacts in hardware.

Quoted 11 lines

---
changes since v1:
- address comments from Dmitry Torokhov
but I kept the access_mutex due to the possible race I described in the
mail:
- touch -> interrupt
- isr reads first packet
- user closes device -> stop command sent
- isr reads payload
- address comments from Henrik Rydberg, letting the input system collect singletouch from the multitouch data using the appropriate functions

ping?

Thanks
Heiko
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw

Hi,

Am Montag, 23. September 2013, 15:50:26 schrieb Heiko Stübner:

Quoted 20 lines

Am Samstag, 7. September 2013, 01:33:11 schrieb Heiko Stübner:

Quoted 19 lines

This adds a driver for touchscreens using the zforce infrared technology from Neonode connected via i2c to the host system.

It supports multitouch with up to two fingers and tracking of the contacts in hardware.

---
changes since v1:
- address comments from Dmitry Torokhov

but I kept the access_mutex due to the possible race I described in the

mail:
- touch -> interrupt
- isr reads first packet
- user closes device -> stop command sent
- isr reads payload

Quoted 6 lines
Quoted 3 lines

- address comments from Henrik Rydberg, letting the input system collect

singletouch from the multitouch data using the appropriate functions

ping?

is the driver ok in this form or is more work needed?

Thanks
Heiko
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html