Skip to contentSkip to conversation

Input: cyttsp - Cypress TTSP capacitive multi-touch screen support

PATCH Superseded [email protected] 1 participant 1 message Oct 15, 2011

Subsystems (2)

v6 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

PATCH v6 1/3 Input: cyttsp - Cypress TTSP capacitive multi-touch screen support

From: Javier Martinez Canillas <[email protected]>

Cypress TrueTouch(tm) Standard Product controllers are found in a wide range of embedded devices. This driver add support for a variety of TTSP controllers.

Since the hardware is capable of tracking identifiable contacts, multi-touch protocol type B (stateful) is used to report contact information.

The driver is composed of a core driver that process the data sent by the contacts and a set of bus specific interface modules. This patch adds the base core TTSP driver.

---

v2: Fix issues called out by Dmitry Torokhov
- Add msleep() delays between retries for read and write operations.
- Change cyttsp_core_init() to receive the IRQ from the client data instead of obtaining from the platform_data.

v3: Fix issues called out by Henrik Rydberg and Mohan Pallaka
- Map each possible track id to a multitouch input slot.
- Remove bus type info since it is not used.
- Add retry logic to ttsp_write_block_data().
- ttsp_read_block_data() already msleep() remove the sleep in the caller.
- cyttsp_xy_worker() sounds as if it's a workqueue, change the function name.
- Check if handle is NULL in cyttsp_resume().
- Use platform data's use_sleep to decide to go deep sleep or low power mode.
- input_register_device() error path has to call input_free_device().

v4: Fix issues called out by Henrik Rydberg
- Remove unnecesary code and cleanup contact handler since input core is able to detect duplicates.

v5: Fix issues called out by Henrik Rydberg
- Cleanup ttsp_[read | write]_block_data functions.
- Remove unused code to handle extended touch data.
- Simplify code in cyttsp_bl_app_data() and cyttsp_soft_reset().

v6: Fix issues called out by Henrik Rydberg
- Remove unneeded retval variables in load_bl_regs() and soft_reset().
- Delete debug paths in bl_app_valid() and exit_bl_mode().
- Simplify logic expressions in exit_bl_mode() and set_operational_mode().
- Check for tries >= CY_DELAY_MAX errors and report accordingly.
- Correct usage of bitwise operators.

 drivers/input/touchscreen/Kconfig              |    2 +
 drivers/input/touchscreen/Makefile             |    1 +
 drivers/input/touchscreen/cyttsp/Kconfig       |   36 ++
 drivers/input/touchscreen/cyttsp/Makefile      |    3 +
 drivers/input/touchscreen/cyttsp/cyttsp_core.c |  769 ++++++++++++++++++++++++
 drivers/input/touchscreen/cyttsp/cyttsp_core.h |   60 ++
 include/linux/input/cyttsp.h                   |   71 +++
 7 files changed, 942 insertions(+), 0 deletions(-)
 create mode 100644 drivers/input/touchscreen/cyttsp/Kconfig
 create mode 100644 drivers/input/touchscreen/cyttsp/Makefile
 create mode 100644 drivers/input/touchscreen/cyttsp/cyttsp_core.c
 create mode 100644 drivers/input/touchscreen/cyttsp/cyttsp_core.h
 create mode 100644 include/linux/input/cyttsp.h
drivers/input/touchscreen/Kconfig +2 -0
index cabd9e5..6933823 100644
@@ -726,4 +726,6 @@ config TOUCHSCREEN_TPS6507X
 	  To compile this driver as a module, choose M here: the
 	  module will be called tps6507x_ts.
 
+source "drivers/input/touchscreen/cyttsp/Kconfig"
+
 endif
drivers/input/touchscreen/Makefile +1 -0
index 282d6f7..945950a 100644
@@ -60,3 +60,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_CYTTSP_CORE)	+= cyttsp/
drivers/input/touchscreen/cyttsp/Kconfig new file +36 -0
new file mode 100644
index 0000000..c8bc322
@@ -0,0 +1,36 @@
+config TOUCHSCREEN_CYTTSP_CORE
+	tristate "Cypress TTSP touchscreen core"
+	depends on INPUT_TOUCHSCREEN
+	help
+          Say Y here if you have a touchscreen interface using one
+          controller from the Cypress TrueTouch(tm) Standard Product
+	  family.
+
+	  If unsure, say N.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called cyttsp_core.
+
+config TOUCHSCREEN_CYTTSP_I2C
+	tristate "Cypress TTSP i2c touchscreen"
+	depends on I2C && TOUCHSCREEN_CYTTSP_CORE
+	help
+	  Say Y here if you have a Cypress TTSP touchscreen
+	  connected to your system with an I2C interface.
+
+	  If unsure, say N.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called cyttsp_i2c.
+
+config TOUCHSCREEN_CYTTSP_SPI
+	tristate "Cypress TTSP spi touchscreen"
+	depends on SPI_MASTER && TOUCHSCREEN_CYTTSP_CORE
+	help
+	  Say Y here if you have a Cypress TTSP touchscreen
+	  connected to your  with an SPI interface.
+
+	  If unsure, say N.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called cyttsp_spi.
drivers/input/touchscreen/cyttsp/Makefile new file +3 -0
new file mode 100644
index 0000000..687eeaa
@@ -0,0 +1,3 @@
+obj-$(CONFIG_TOUCHSCREEN_CYTTSP_CORE)   += cyttsp_core.o
+obj-$(CONFIG_TOUCHSCREEN_CYTTSP_I2C)    += cyttsp_i2c.o
+obj-$(CONFIG_TOUCHSCREEN_CYTTSP_SPI)    += cyttsp_spi.o
drivers/input/touchscreen/cyttsp/cyttsp_core.c new file +769 -0

769 lines not on this page · raw message

drivers/input/touchscreen/cyttsp/cyttsp_core.h new file +60 -0

60 lines not on this page · raw message

include/linux/input/cyttsp.h new file +71 -0

71 lines not on this page · raw message

Signature · 1 line
1.7.4.1