Skip to contentSkip to conversation

Input: Add I2C attached EETI EXC3000 multi touch driver

PATCH In review Ahmet Inan 3 participants 3 messages Sep 28, 2017 – Oct 6, 2017

Subsystems (3)
lore
Share & tools
lore

Ahmet Inan

author
#0 lore raw

PATCH 1/1 Input: Add I2C attached EETI EXC3000 multi touch driver

The 3000 series have a new protocol which allows to report up to 5 points in a single 66 byte frame. One must always read in 66 byte frames. To support up to 10 points, two consecutive frames need to be read:
The first frame says how many points until sync.
The second frame must say zero points or both frames must be discarded.

To be able to work with the higher 400KHz I2C bus rate, one must successfully send a special package prior _each_ read or the controller will refuse to cooperate.

This is a minimal implementation based on egalax_i2c.c (which can be found on the internet) and egalax_ts.c but without the vendor interface and no power management support.

---
 .../bindings/input/touchscreen/exc3000.txt         |  27 ++++
 drivers/input/touchscreen/Kconfig                  |  10 ++
 drivers/input/touchscreen/Makefile                 |   1 +
 drivers/input/touchscreen/exc3000.c                | 173 +++++++++++++++++++++
 4 files changed, 211 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/touchscreen/exc3000.txt
 create mode 100644 drivers/input/touchscreen/exc3000.c
Documentation/devicetree/bindings/input/touchscreen/exc3000.txt new file +27 -0
new file mode 100644
index 000000000000..d2a78e83e921
@@ -0,0 +1,27 @@
+* EETI EXC3000 Multiple Touch Controller
+
+Required properties:
+- compatible: must be "eeti,exc3000"
+- reg: i2c slave address
+- interrupt-parent: the phandle for the interrupt controller
+- interrupts: touch controller interrupt
+- touchscreen-size-x: See touchscreen.txt
+- touchscreen-size-y: See touchscreen.txt
+
+Optional properties:
+- touchscreen-inverted-x: See touchscreen.txt
+- touchscreen-inverted-y: See touchscreen.txt
+- touchscreen-swapped-x-y: See touchscreen.txt
+
+Example:
+
+	exc3000@2a {
+		compatible = "eeti,exc3000";
+		reg = <0x2a>;
+		interrupt-parent = <&gpio1>;
+		interrupts = <9 8>; // active low level-sensitive
+		touchscreen-size-x = <4096>;
+		touchscreen-size-y = <4096>;
+		touchscreen-inverted-x;
+		touchscreen-swapped-x-y;
+	};
drivers/input/touchscreen/Kconfig +10 -0
index 0bf78ff1ae88..9ea2d9287b38 100644
@@ -314,6 +314,16 @@ config TOUCHSCREEN_EGALAX_SERIAL
 	  To compile this driver as a module, choose M here: the
 	  module will be called egalax_ts_serial.
 
+config TOUCHSCREEN_EXC3000
+	tristate "EETI EXC3000 multi-touch panel support"
+	depends on I2C
+	help
+	  Say Y here to enable support for I2C connected EETI
+	  EXC3000 multi-touch panels.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called exc3000.
+
 config TOUCHSCREEN_FUJITSU
 	tristate "Fujitsu serial touchscreen"
 	select SERIO
drivers/input/touchscreen/Makefile +1 -0
index f720bc30ada9..48118379fee7 100644
@@ -38,6 +38,7 @@ obj-$(CONFIG_TOUCHSCREEN_ELAN)		+= elants_i2c.o
 obj-$(CONFIG_TOUCHSCREEN_ELO)		+= elo.o
 obj-$(CONFIG_TOUCHSCREEN_EGALAX)	+= egalax_ts.o
 obj-$(CONFIG_TOUCHSCREEN_EGALAX_SERIAL)	+= egalax_ts_serial.o
+obj-$(CONFIG_TOUCHSCREEN_EXC3000)	+= exc3000.o
 obj-$(CONFIG_TOUCHSCREEN_FUJITSU)	+= fujitsu_ts.o
 obj-$(CONFIG_TOUCHSCREEN_GOODIX)	+= goodix.o
 obj-$(CONFIG_TOUCHSCREEN_ILI210X)	+= ili210x.o
drivers/input/touchscreen/exc3000.c new file +173 -0

173 lines not on this page · raw message

Signature · 1 line
2.11.0
maintainer
#1 lore raw
Quoted 10 lines · Ahmet Inan

The 3000 series have a new protocol which allows to report up to 5 points in a single 66 byte frame. One must always read in 66 byte frames. To support up to 10 points, two consecutive frames need to be read:
The first frame says how many points until sync.
The second frame must say zero points or both frames must be discarded.

To be able to work with the higher 400KHz I2C bus rate, one must successfully send a special package prior _each_ read or the controller will refuse to cooperate.

Quoted 7 lines

This is a minimal implementation based on egalax_i2c.c (which can be found on the internet) and egalax_ts.c but without the vendor interface and no power management support.

---
 .../bindings/input/touchscreen/exc3000.txt         |  27 ++++

Please split to separate patch.

Quoted 21 lines
 drivers/input/touchscreen/Kconfig                  |  10 ++
 drivers/input/touchscreen/Makefile                 |   1 +
 drivers/input/touchscreen/exc3000.c                | 173 +++++++++++++++++++++
 4 files changed, 211 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/touchscreen/exc3000.txt
 create mode 100644 drivers/input/touchscreen/exc3000.c
Documentation/devicetree/bindings/input/touchscreen/exc3000.txt new file +8 -0
new file mode 100644
index 000000000000..d2a78e83e921
@@ -0,0 +1,27 @@
+* EETI EXC3000 Multiple Touch Controller
+
+Required properties:
+- compatible: must be "eeti,exc3000"
+- reg: i2c slave address
+- interrupt-parent: the phandle for the interrupt controller
+- interrupts: touch controller interrupt
+- touchscreen-size-x: See touchscreen.txt

Documentation/devicetree/bindings/input/touchscreen/exc3000.txt line 18

Quoted 10 lines
Documentation/devicetree/bindings/input/touchscreen/exc3000.txt new file +10 -0
+- touchscreen-size-y: See touchscreen.txt
+
+Optional properties:
+- touchscreen-inverted-x: See touchscreen.txt
+- touchscreen-inverted-y: See touchscreen.txt
+- touchscreen-swapped-x-y: See touchscreen.txt
+
+Example:
+
+	exc3000@2a {

touchscreen@2a

Documentation/devicetree/bindings/input/touchscreen/exc3000.txt line 22

Quoted 4 lines
Documentation/devicetree/bindings/input/touchscreen/exc3000.txt new file +4 -0
+		compatible = "eeti,exc3000";
+		reg = <0x2a>;
+		interrupt-parent = <&gpio1>;
+		interrupts = <9 8>; // active low level-sensitive

Use the defines for flags.

Quoted 5 lines
Documentation/devicetree/bindings/input/touchscreen/exc3000.txt new file +5 -0
+		touchscreen-size-x = <4096>;
+		touchscreen-size-y = <4096>;
+		touchscreen-inverted-x;
+		touchscreen-swapped-x-y;
+	};
#2 lore raw

Dear Rob,

Quoted 3 lines
Quoted 1 line
 .../bindings/input/touchscreen/exc3000.txt         |  27 ++++

Please split to separate patch.

done.

Quoted 3 lines

Documentation/devicetree/bindings/input/touchscreen/exc3000.txt line 18

Quoted 1 line
Documentation/devicetree/bindings/input/touchscreen/exc3000.txt new file +1 -0
+	exc3000@2a {

touchscreen@2a

done.

Quoted 3 lines

Documentation/devicetree/bindings/input/touchscreen/exc3000.txt line 22

Quoted 1 line
Documentation/devicetree/bindings/input/touchscreen/exc3000.txt new file +1 -0
+		interrupts = <9 8>; // active low level-sensitive

Use the defines for flags.

done.

I've sent two new patches.

Best Regards,

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