Skip to contentSkip to conversation

input/touchscreen: Synaptics Touchscreen Driver

RFC PATCH New Christopher Heiny 1 participant 2 messages Feb 2, 2010 Input drivers

lore
Share & tools
lore
#0 lore raw

cover input/touchscreen: Synaptics Touchscreen Driver

This patch adds an initial driver supporting Synaptics ClearPad touchscreens that use the RMI4 protocol, as defined here:

http://www.synaptics.com/sites/default/files/511-000136-01_revA.pdf

This version of the driver does not support all features of the RMI4 protocol yet. We felt it more important to start with a solid implementation of the basic functionality, and then build on that base to support additional features (such as gestures, proximity detection, capacitive buttons, and so on).

Additionally, as this is our team's first venture into the wonderful world of kernel submissions, we figured it was important to start out initially with a fairly simple codebase, just in case we're doing something horribly wrong.

The significant files in this version of the driver are:
rmi_core.c
Implements the basic core of the RMI4 protocol including self-discovery of RMI4 functions. This also implements RMI4 function 0x01, which provides generic device control.
rmi_function_11.c
Implements basic RMI4 function 0x11 (2D sensor) features, including multitouch up to 10 fingers.
rmi_app_touchpad.c
The major driver functions (mod_init, mod_exit, and so on).
More detailed descriptions can be found in each file's comments.

We chose to use multiple source files because it makes it easy to add support for additional RMI4 functions with minimal impact to existing functions. Additionally, this supports future changes to the configuration to allow you to compile in only those RMI4 functions that you need for your particular device.

There are two existing drivers for similar Synaptics devices in the current kernel tree (excluding the PS/2 touchpad driver). These are:

./linux-2.6/drivers/input/mouse/synaptics_i2c.c
A driver for the Exeda 15mm touchpad, written by Mike Rapoport <[email protected]> and Igor Grinberg <[email protected]>

./linux-2.6/drivers/staging/dream/synaptics_i2c_rmi.c
A driver for the HTC Dream ClearPad, written by Arve Hjønnevåg <[email protected]>

We have not extended these drivers for a couple of reasons. First, the two drivers are specific to particular Synaptics products, and it is our desire to produce a general solution that takes advantage of the 'self describing' features of products that use the RMI protocol.

Second, and more importantly, is that the existing drivers are written for an older version of the RMI protocol (aka RMI3) that is being retired in favor of a more recent and substantially changed version (aka RMI4). Most currently shipping Synaptics ClearPads speak the RMI4 protocol, and it will be Synaptics protocol of choice going forward. In almost all respects, RMI4 is not backward compatible with RMI3, making it impractical to support both versions in the same driver.

Comments and other feedback on this driver are welcomed.

Bill Manson
Allie Xiong
Christopher Heiny

---

#1 lore raw

RFC PATCH 1/1 input/touchscreen: Synaptics Touchscreen Driver

Initial driver for Synaptics touchscreens using RMI4 protocol.

---

 drivers/input/touchscreen/Kconfig            |   13 +
 drivers/input/touchscreen/Makefile           |    1 +
 drivers/input/touchscreen/rmi.h              |  214 +++++++++
 drivers/input/touchscreen/rmi_app_touchpad.c |  490 +++++++++++++++++++++
 drivers/input/touchscreen/rmi_core.c         |  602 ++++++++++++++++++++++++++
 drivers/input/touchscreen/rmi_core.h         |   59 +++
 drivers/input/touchscreen/rmi_function_11.c  |  333 ++++++++++++++
 drivers/input/touchscreen/rmi_function_11.h  |   41 ++
 drivers/input/touchscreen/rmi_functions.h    |  107 +++++
 drivers/input/touchscreen/rmi_i2c.h          |   57 +++
 drivers/input/touchscreen/rmi_i2c_gta01.c    |  125 ++++++
 drivers/input/touchscreen/rmi_phys_i2c.c     |  555 ++++++++++++++++++++++++
 12 files changed, 2597 insertions(+), 0 deletions(-)
drivers/input/touchscreen/Kconfig +13 -0
index dfafc76..319cb45 100644
@@ -295,6 +295,19 @@ config TOUCHSCREEN_MIGOR
 	  To compile this driver as a module, choose M here: the
 	  module will be called migor_ts.
 
+config TOUCHSCREEN_SYNAPTICS_RMI4_I2C
+	tristate "Synaptics RMI4 I2C touchscreens"
+	depends on I2C
+	help
+	  Say Y here if you have a Synaptics RMI4 I2C touchscreen connected to
+   	  your system. This enables support for Synaptics RMI4 over I2C based
+          touchscreens.
+
+	  If unsure, say N.
+
+	  To compile this driver as a set of modules, choose M here: the
+	  modules will be called rmi, rmi_app_touchpad, rmi_phys_i2c.
+
 config TOUCHSCREEN_TOUCHRIGHT
 	tristate "Touchright serial touchscreen"
 	select SERIO
drivers/input/touchscreen/Makefile +1 -0
index d61a3b4..8e7b708 100644
@@ -30,6 +30,7 @@ obj-$(CONFIG_TOUCHSCREEN_USB_COMPOSITE)	+= usbtouchscreen.o
 obj-$(CONFIG_TOUCHSCREEN_PCAP)		+= pcap_ts.o
 obj-$(CONFIG_TOUCHSCREEN_PENMOUNT)	+= penmount.o
 obj-$(CONFIG_TOUCHSCREEN_S3C2410)	+= s3c2410_ts.o
+obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_RMI4_I2C)	+= rmi_core.o rmi_app_touchpad.o rmi_function_11.o rmi_phys_i2c.o rmi_i2c_gta01.o
 obj-$(CONFIG_TOUCHSCREEN_TOUCHIT213)	+= touchit213.o
 obj-$(CONFIG_TOUCHSCREEN_TOUCHRIGHT)	+= touchright.o
 obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN)	+= touchwin.o
drivers/input/touchscreen/rmi.h new file +214 -0

214 lines not on this page · raw message

drivers/input/touchscreen/rmi_app_touchpad.c new file +490 -0

490 lines not on this page · raw message

drivers/input/touchscreen/rmi_core.c new file +602 -0

602 lines not on this page · raw message

drivers/input/touchscreen/rmi_core.h new file +59 -0

59 lines not on this page · raw message

drivers/input/touchscreen/rmi_function_11.c new file +333 -0

333 lines not on this page · raw message

drivers/input/touchscreen/rmi_function_11.h new file +41 -0

41 lines not on this page · raw message

drivers/input/touchscreen/rmi_functions.h new file +107 -0

107 lines not on this page · raw message

drivers/input/touchscreen/rmi_i2c.h new file +57 -0

57 lines not on this page · raw message

drivers/input/touchscreen/rmi_i2c_gta01.c new file +125 -0

125 lines not on this page · raw message

drivers/input/touchscreen/rmi_phys_i2c.c new file +555 -0

555 lines not on this page · raw message