Skip to contentSkip to conversation

Input: Add driver for Goodix GTx5 series touchscreen

PATCH In review Wang Yafei 1 participant 1 message Jun 29, 2017

Subsystems (2)
lore
Share & tools
lore

Wang Yafei

author
#0 lore raw

PATCH v5 2/2 Input: Add driver for Goodix GTx5 series touchscreen

This driver is for Goodix GTx5 series touchscreen controllers such as GT8589, GT7589. This driver designed with hierarchical structure, for that can be modified to support subsequent controllers easily. Some zones of the touchscreen can be set to buttons(according to the hardware). That is why it handles button and multitouch events.

A brief description of driver structure
- Core Layer: This layer responsible for basic input events report, GPIO pinctrl, Interrupt, Power resources manager and sub-modules manager.
- Hardware Layer: This layer responsible for controllers initialization, irq handle as well as bus read/write.
- External Module Layer: This layer used for support more features such as firmware update, debug tools and gesture wakeup.

---
Changes in v2:
- replace touchscreen properties according to the description in Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt
- Droped all compat stuff for older kernels
- Removed Android stuff (EARLY_SUSPEND, CONFIG_FB)
- Use device_property_read_* get device properties
- Use get-unaligned_*() API
- Use dev_err() dev_dbg() for logging
- Remove pinctrl functions
- Remove some unused functions

Changes in v3:
- Modify Kconfig

Changes in v4:
- Unify functions name and file name
- Recheck code spell and style problems
- Modify code comments
- Remove firmware update and debug tool modules

Changes in v5:
- Modify DT related functions
- Remove irq-gpio

---
 drivers/input/touchscreen/Kconfig     |   12 +
 drivers/input/touchscreen/Makefile    |    1 +
 drivers/input/touchscreen/gtx5_core.c | 1259 +++++++++++++++++++++++++++++++++
 drivers/input/touchscreen/gtx5_core.h |  398 +++++++++++
 drivers/input/touchscreen/gtx5_i2c.c  |  802 +++++++++++++++++++++
 5 files changed, 2472 insertions(+)
 create mode 100644 drivers/input/touchscreen/gtx5_core.c
 create mode 100644 drivers/input/touchscreen/gtx5_core.h
 create mode 100644 drivers/input/touchscreen/gtx5_i2c.c
drivers/input/touchscreen/Kconfig +12 -0
index cf26ca4..e879af8 100644
@@ -344,6 +344,18 @@ config TOUCHSCREEN_GOODIX
 	  To compile this driver as a module, choose M here: the
 	  module will be called goodix.
 
+config TOUCHSCREEN_GTX5
+	tristate "Goodix GTx5 touchscreen"
+	depends on I2C && OF
+	depends on GPIOLIB
+	help
+	  Say Y here if you have a touchscreen using Goodix GTx5 series
+	  controller.
+
+	  If unsure, say N.
+
+	  To compile this driver as a module, choose M here
+
 config TOUCHSCREEN_ILI210X
 	tristate "Ilitek ILI210X based touchscreen"
 	depends on I2C
drivers/input/touchscreen/Makefile +1 -0
index 18e4769..00643d4 100644
@@ -39,6 +39,7 @@ obj-$(CONFIG_TOUCHSCREEN_EGALAX)	+= egalax_ts.o
 obj-$(CONFIG_TOUCHSCREEN_EGALAX_SERIAL)	+= egalax_ts_serial.o
 obj-$(CONFIG_TOUCHSCREEN_FUJITSU)	+= fujitsu_ts.o
 obj-$(CONFIG_TOUCHSCREEN_GOODIX)	+= goodix.o
+obj-$(CONFIG_TOUCHSCREEN_GTX5)		+= gtx5_i2c.o gtx5_core.o
 obj-$(CONFIG_TOUCHSCREEN_ILI210X)	+= ili210x.o
 obj-$(CONFIG_TOUCHSCREEN_IMX6UL_TSC)	+= imx6ul_tsc.o
 obj-$(CONFIG_TOUCHSCREEN_INEXIO)	+= inexio.o
drivers/input/touchscreen/gtx5_core.c new file +1256 -0

1,256 lines not on this page · raw message

drivers/input/touchscreen/gtx5_core.h new file +398 -0

398 lines not on this page · raw message

drivers/input/touchscreen/gtx5_i2c.c new file +802 -0

802 lines not on this page · raw message

Signature · 1 line
2.7.4