input: touchscreen: Add support for Elan eKTF2127 touchscreen controller
Subsystems (3)
PATCH v2 1/1 input: touchscreen: Add support for Elan eKTF2127 touchscreen controller
From: Siebren Vroegindeweij <[email protected]>
This adds a driver for the Elan eKTF2127 touchscreen controller, which speaks an i2c protocol which is distinctly different from the already supported eKTH controllers.
---
Changes in v2:
-Improve devicetree bindings document
-Use touchscreen_parse_properties and touchscreen_report_pos instead of DIY -Remove a bunch of unused defines (copy and paste leftover from chipone driver) -Some other minor cleanups and review comments addressed
-Add defines for some command / address hex-values
-Check packet header in interrupt handler
--- .../bindings/input/touchscreen/ektf2127.txt | 27 ++ drivers/input/touchscreen/Kconfig | 12 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/ektf2127.c | 333 +++++++++++++++++++++ 4 files changed, 373 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/ektf2127.txt create mode 100644 drivers/input/touchscreen/ektf2127.c
Documentation/devicetree/bindings/input/touchscreen/ektf2127.txt new file +27 -0
@@ -0,0 +1,27 @@ +* Elan eKTF2127 I2C touchscreen controller + +Required properties: + - compatible : "elan,ektf2127" + - reg : I2C slave address of the chip (0x40) + - interrupt-parent : a phandle pointing to the interrupt controller + serving the interrupt for this chip + - interrupts : interrupt specification for the ektf2127 interrupt + - power-gpios : GPIO specification for the pin connected to the + ektf2127's wake input. This needs to be driven high + to take ektf2127 out of it's low power state + +For additional optional properties see: touchscreen.txt + +Example: + +i2c at 00000000 { + ektf2127: touchscreen at 15 { + compatible = "elan,ektf2127"; + reg = <0x15>; + interrupt-parent = <&pio>; + interrupts = <6 11 IRQ_TYPE_EDGE_FALLING> + power-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; + touchscreen-inverted-x; + touchscreen-swapped-x-y; + }; +};
drivers/input/touchscreen/Kconfig +12 -0
@@ -396,6 +396,18 @@ config TOUCHSCREEN_ELAN To compile this driver as a module, choose M here: the module will be called elants_i2c. +config TOUCHSCREEN_EKTF2127 + tristate "Elan eKTF2127 I2C touchscreen" + depends on I2C + help + Say Y here if you have an Elan eKTF2127 touchscreen + connected to your system. + + If unsure, say N. + + To compile this driver as a module, choose M here: the + module will be called ektf2127. + config TOUCHSCREEN_ELO tristate "Elo serial touchscreens" select SERIO
drivers/input/touchscreen/Makefile +1 -0
@@ -33,6 +33,7 @@ obj-$(CONFIG_TOUCHSCREEN_HAMPSHIRE) += hampshire.o obj-$(CONFIG_TOUCHSCREEN_GUNZE) += gunze.o obj-$(CONFIG_TOUCHSCREEN_EETI) += eeti_ts.o obj-$(CONFIG_TOUCHSCREEN_ELAN) += elants_i2c.o +obj-$(CONFIG_TOUCHSCREEN_EKTF2127) += ektf2127.o obj-$(CONFIG_TOUCHSCREEN_ELO) += elo.o obj-$(CONFIG_TOUCHSCREEN_EGALAX) += egalax_ts.o obj-$(CONFIG_TOUCHSCREEN_EGALAX_SERIAL) += egalax_ts_serial.o
drivers/input/touchscreen/ektf2127.c new file +333 -0
333 lines not on this page · raw message
Signature · 1 line
2.9.3
Rob Herring
maintainerPATCH v2 1/1 input: touchscreen: Add support for Elan eKTF2127 touchscreen controller
Quoted 11 lines · Hans de Goede
From: Siebren Vroegindeweij <[email protected]>
This adds a driver for the Elan eKTF2127 touchscreen controller, which speaks an i2c protocol which is distinctly different from the already supported eKTH controllers.
Signed-off-by Michel Verlaan <[email protected]>Signed-off-by Siebren Vroegindeweij <[email protected]>Signed-off-by Hans de Goede <[email protected]>---
Changes in v2:
Review
Quoted 8 lines
(quoted diff) +0
-7-Improve devicetree bindings document -Use touchscreen_parse_properties and touchscreen_report_pos instead of DIY -Remove a bunch of unused defines (copy and paste leftover from chipone driver) -Some other minor cleanups and review comments addressed -Add defines for some command / address hex-values -Check packet header in interrupt handler --- .../bindings/input/touchscreen/ektf2127.txt | 27 ++
Quoted 6 lines
drivers/input/touchscreen/Kconfig | 12 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/ektf2127.c | 333 +++++++++++++++++++++ 4 files changed, 373 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/ektf2127.txt create mode 100644 drivers/input/touchscreen/ektf2127.c
Dmitry Torokhov
maintainerPATCH v2 1/1 input: touchscreen: Add support for Elan eKTF2127 touchscreen controller
Quoted 7 lines · Rob Herring
Quoted 6 lines · Hans de Goede
From: Siebren Vroegindeweij <[email protected]>
This adds a driver for the Elan eKTF2127 touchscreen controller, which speaks an i2c protocol which is distinctly different from the already supported eKTH controllers.
Quoted 15 lines
Review
Quoted 13 lines
Signed-off-by Michel Verlaan <[email protected]>Signed-off-by Siebren Vroegindeweij <[email protected]>Signed-off-by Hans de Goede <[email protected]>---
Changes in v2:(quoted diff) +0
-7-Improve devicetree bindings document -Use touchscreen_parse_properties and touchscreen_report_pos instead of DIY -Remove a bunch of unused defines (copy and paste leftover from chipone driver) -Some other minor cleanups and review comments addressed -Add defines for some command / address hex-values -Check packet header in interrupt handler --- .../bindings/input/touchscreen/ektf2127.txt | 27 ++Acked-by Rob Herring <[email protected]>
I'd like to merge the version below (factored out querying dimensions and parsing/reporting touch), can you please give it a spin?
Thanks!
Signature · 23 lines
Dmitry Input: touchscreen - add support for Elan eKTF2127 touchscreen controller From: Siebren Vroegindeweij <[email protected]> This adds a driver for the Elan eKTF2127 touchscreen controller, which speaks an i2c protocol which is distinctly different from the already supported eKTH controllers. Signed-off-by: Michel Verlaan <[email protected]> Signed-off-by: Siebren Vroegindeweij <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]> --- .../bindings/input/touchscreen/ektf2127.txt | 27 ++ drivers/input/touchscreen/Kconfig | 12 + drivers/input/touchscreen/Makefile | 1 drivers/input/touchscreen/ektf2127.c | 336 ++++++++++++++++++++ 4 files changed, 376 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/ektf2127.txt create mode 100644 drivers/input/touchscreen/ektf2127.c
Documentation/devicetree/bindings/input/touchscreen/ektf2127.txt new file +27 -0
@@ -0,0 +1,27 @@ +* Elan eKTF2127 I2C touchscreen controller + +Required properties: + - compatible : "elan,ektf2127" + - reg : I2C slave address of the chip (0x40) + - interrupt-parent : a phandle pointing to the interrupt controller + serving the interrupt for this chip + - interrupts : interrupt specification for the ektf2127 interrupt + - power-gpios : GPIO specification for the pin connected to the + ektf2127's wake input. This needs to be driven high + to take ektf2127 out of it's low power state + +For additional optional properties see: touchscreen.txt + +Example: + +i2c at 00000000 { + ektf2127: touchscreen at 15 { + compatible = "elan,ektf2127"; + reg = <0x15>; + interrupt-parent = <&pio>; + interrupts = <6 11 IRQ_TYPE_EDGE_FALLING> + power-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; + touchscreen-inverted-x; + touchscreen-swapped-x-y; + }; +};
drivers/input/touchscreen/Kconfig +12 -0
@@ -396,6 +396,18 @@ config TOUCHSCREEN_ELAN To compile this driver as a module, choose M here: the module will be called elants_i2c. +config TOUCHSCREEN_EKTF2127 + tristate "Elan eKTF2127 I2C touchscreen" + depends on I2C + help + Say Y here if you have an Elan eKTF2127 touchscreen + connected to your system. + + If unsure, say N. + + To compile this driver as a module, choose M here: the + module will be called ektf2127. + config TOUCHSCREEN_ELO tristate "Elo serial touchscreens" select SERIO
drivers/input/touchscreen/Makefile +1 -0
@@ -33,6 +33,7 @@ obj-$(CONFIG_TOUCHSCREEN_HAMPSHIRE) += hampshire.o obj-$(CONFIG_TOUCHSCREEN_GUNZE) += gunze.o obj-$(CONFIG_TOUCHSCREEN_EETI) += eeti_ts.o obj-$(CONFIG_TOUCHSCREEN_ELAN) += elants_i2c.o +obj-$(CONFIG_TOUCHSCREEN_EKTF2127) += ektf2127.o obj-$(CONFIG_TOUCHSCREEN_ELO) += elo.o obj-$(CONFIG_TOUCHSCREEN_EGALAX) += egalax_ts.o obj-$(CONFIG_TOUCHSCREEN_EGALAX_SERIAL) += egalax_ts_serial.o
drivers/input/touchscreen/ektf2127.c new file +336 -0
336 lines not on this page · raw message
PATCH v2 1/1 input: touchscreen: Add support for Elan eKTF2127 touchscreen controller
Hi,
Quoted 24 lines · Dmitry Torokhov
Quoted 7 lines · Rob Herring
Quoted 6 lines · Hans de Goede
From: Siebren Vroegindeweij <[email protected]>
This adds a driver for the Elan eKTF2127 touchscreen controller, which speaks an i2c protocol which is distinctly different from the already supported eKTH controllers.
Quoted 15 lines
Review
Quoted 13 lines
Signed-off-by Michel Verlaan <[email protected]>Signed-off-by Siebren Vroegindeweij <[email protected]>Signed-off-by Hans de Goede <[email protected]>---
Changes in v2:(quoted diff) +0
-7-Improve devicetree bindings document -Use touchscreen_parse_properties and touchscreen_report_pos instead of DIY -Remove a bunch of unused defines (copy and paste leftover from chipone driver) -Some other minor cleanups and review comments addressed -Add defines for some command / address hex-values -Check packet header in interrupt handler --- .../bindings/input/touchscreen/ektf2127.txt | 27 ++Acked-by Rob Herring <[email protected]>
Quoted 2 lines
I'd like to merge the version below (factored out querying dimensions and parsing/reporting touch), can you please give it a spin?
Just tested it, works as advertised. Nice cleanup, esp. the refactoring of the dimension querying, I should have tought of that myself.
Regards,
Hans