Skip to contentSkip to conversation

input synaptics-rmi4: Synaptics Touchscreen Driver

PATCH New Christopher Heiny 1 participant 2 messages Jan 13, 2011

Subsystems (2)
lore
Share & tools
lore
#1 lore raw

PATCH 1/1 input synaptics-rmi4: Synaptics Touchscreen Driver

In reply to Christopher Heiny

Driver for Synaptics touchscreens using RMI4 protocol.

Cc Dmitry Torokhov <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Naveen Kumar Gaddipati <[email protected]>
Cc Abraham Arce <[email protected]>

---

 drivers/input/touchscreen/Kconfig            |   19 +-
 drivers/input/touchscreen/Makefile           |    3 +-
 drivers/input/touchscreen/rmi_app_touchpad.c |  400 ---------------
 drivers/input/touchscreen/rmi_bus.c          |  393 ++++++++++++++
 drivers/input/touchscreen/rmi_bus.h          |   41 ++
 drivers/input/touchscreen/rmi_core.c         |  708 --------------------------
 drivers/input/touchscreen/rmi_core.h         |   57 --
 drivers/input/touchscreen/rmi_drvr.h         |  203 ++++++++
 drivers/input/touchscreen/rmi_f01.c          |  169 ++++++
 drivers/input/touchscreen/rmi_f01.h          |   46 ++
 drivers/input/touchscreen/rmi_f11.c          |  472 +++++++++++++++++
 drivers/input/touchscreen/rmi_f11.h          |   47 ++
 drivers/input/touchscreen/rmi_f34.c          |  556 ++++++++++++++++++++
 drivers/input/touchscreen/rmi_f34.h          |   56 ++
 drivers/input/touchscreen/rmi_function.c     |  352 +++++++++++++
 drivers/input/touchscreen/rmi_function.h     |  199 ++++++++
 drivers/input/touchscreen/rmi_function_11.c  |  439 ----------------
 drivers/input/touchscreen/rmi_function_11.h  |   43 --
 drivers/input/touchscreen/rmi_functions.h    |  111 ----
 drivers/input/touchscreen/rmi_i2c.c          |  588 +++++++++++++++++++++
 drivers/input/touchscreen/rmi_phys_i2c.c     |  577 ---------------------
 drivers/input/touchscreen/rmi_sensor.c       |  706 +++++++++++++++++++++++++
 drivers/input/touchscreen/rmi_sensor.h       |  121 +++++
 drivers/input/touchscreen/rmi_spi.c          |  477 +++++++++++++++++
 drivers/input/touchscreen/rmi_spi.h          |   53 ++
 25 files changed, 4499 insertions(+), 2337 deletions(-)
drivers/input/touchscreen/Kconfig +18 -1
index b62139b..48219b3 100644
@@ -314,7 +314,24 @@ config TOUCHSCREEN_SYNAPTICS_RMI4_I2C
 	  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.
+	  modules will be called rmi_core, rmi_app_touchpad, rmi_phys_i2c.
+
+config TOUCHSCREEN_SYNAPTICS_RMI4_SPI
+	tristate "Synaptics RMI4 SPI touchscreens"
+	depends on SPI
+	help
+	  Say Y here if you have a Synaptics RMI4 SPI touchscreen connected to
+	  your system. This enables support for Synaptics RMI4 over SPI based
+	  touchscreens.
+
+	  If unsure, say N.
+
+	  To compile this driver as a set of modules, choose M here: the
+	  modules will be called rmi_core, rmi_app_touchpad, rmi_phys_spi.
+
+config SYNA_MULTI_TOUCH
+	bool "Synaptics pointing using multi-touch events"
+	depends on TOUCHSCREEN_SYNAPTICS_RMI4_I2C || TOUCHSCREEN_SYNAPTICS_RMI4_SPI
 
 config TOUCHSCREEN_TOUCHRIGHT
 	tristate "Touchright serial touchscreen"
drivers/input/touchscreen/Makefile +2 -1
index b81109b..a17e03e 100644
@@ -31,7 +31,8 @@ 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
+obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_RMI4_I2C)	+=  rmi_bus.o rmi_sensor.o rmi_function.o rmi_f01.o rmi_f11.o rmi_f34.o rmi_i2c.o
+obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_RMI4_SPI)	+=  rmi_bus.o rmi_sensor.o rmi_function.o rmi_f01.o rmi_f11.o rmi_f34.o rmi_spi.o
 obj-$(CONFIG_TOUCHSCREEN_TOUCHIT213)	+= touchit213.o
 obj-$(CONFIG_TOUCHSCREEN_TOUCHRIGHT)	+= touchright.o
 obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN)	+= touchwin.o
drivers/input/touchscreen/rmi_app_touchpad.c deleted +0 -400

400 lines not on this page · raw message

drivers/input/touchscreen/rmi_bus.c new file +393 -0

393 lines not on this page · raw message

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

41 lines not on this page · raw message

drivers/input/touchscreen/rmi_core.c deleted +0 -708

708 lines not on this page · raw message

drivers/input/touchscreen/rmi_core.h deleted +0 -57

57 lines not on this page · raw message

drivers/input/touchscreen/rmi_drvr.h new file +203 -0

203 lines not on this page · raw message

drivers/input/touchscreen/rmi_f01.c new file +169 -0

169 lines not on this page · raw message

drivers/input/touchscreen/rmi_f01.h new file +46 -0

46 lines not on this page · raw message

drivers/input/touchscreen/rmi_f11.c new file +472 -0

472 lines not on this page · raw message

drivers/input/touchscreen/rmi_f11.h new file +47 -0

47 lines not on this page · raw message

drivers/input/touchscreen/rmi_f34.c new file +556 -0

430 lines not on this page · raw message

drivers/input/touchscreen/rmi_f34.h new file +56 -0

56 lines not on this page · raw message

drivers/input/touchscreen/rmi_function.c new file +352 -0

352 lines not on this page · raw message

drivers/input/touchscreen/rmi_function.h new file +199 -0

199 lines not on this page · raw message

drivers/input/touchscreen/rmi_function_11.c deleted +0 -439

439 lines not on this page · raw message

drivers/input/touchscreen/rmi_function_11.h deleted +0 -43

43 lines not on this page · raw message

drivers/input/touchscreen/rmi_functions.h deleted +0 -111

111 lines not on this page · raw message

drivers/input/touchscreen/rmi_i2c.c new file +588 -0

588 lines not on this page · raw message

drivers/input/touchscreen/rmi_i2c.h +0 -0
old mode 100644
new mode 100755
drivers/input/touchscreen/rmi_phys_i2c.c deleted +0 -577

577 lines not on this page · raw message

drivers/input/touchscreen/rmi_sensor.c new file +706 -0

706 lines not on this page · raw message

drivers/input/touchscreen/rmi_sensor.h new file +121 -0

121 lines not on this page · raw message

drivers/input/touchscreen/rmi_spi.c new file +477 -0

477 lines not on this page · raw message

drivers/input/touchscreen/rmi_spi.h new file +53 -0

53 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

#0 lore raw

cover input synaptics-rmi4: Synaptics Touchscreen Driver

This patch implements a driver supporting Synaptics ClearPad and other touchscreens that use the RMI4 protocol, as defined here:

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

This patch is against the synaptics-rmi4 branch of Dmitry's Torokhov's input git repository. Base point is the origin of the branch, commit a6268cc5f94c89c9e661150fe136b24e69d6cc01.

I2C functionality was previously ACK'ed by Jean Delvare on 2010/05/29.

This patch builds and runs in our development environment, but I cannot guarantee that it will build for you. We're working on making sure it builds generically, and feedback relating to that will be greatly appreciated (special thanks to Joerie de Gram for his previous feedback on this).

This version of the driver implements the following:
- basic device control support
- support basic multifinger touchscreen behavior
- support for device reflash
It represents a significant rearchitecture and reimplementation since our patch of 2010/07/27, based on feedback from that patch and subsequent discussions with kernel maintainers.

This patch supports a system having one or more RMI sensors attached to it. Most devices have just a single touch sensor, but some have more than one. An example is the Fuse concept phone, which has 4 RMI sensors in it). Each sensor implements a number of RMI4 functions, which are best represented as devices on the bus.

Included in this patch are the following components:

- a low level layer providing access to the physical bus (rmi_i2c and rmi_spi).

- an rmi_bus module, implementing /sys/bus/rmi. This module presents the individual devices on the bus, handles interdevice communications (mostly just IRQ notifications from F01 to other functions), and proxies register read/write requests to the appropriate physical layer for a given sensor.

- individual sensors are presented on the bus as /sys/bus/rmi/sensor0/, /sys/bus/rmi/sensor01/, and so on.

- functions for each sensor are presented as devices below that sensor, for example /sys/bus/rmi/sensor0/f01, /sys/bus/rmi/sensor0/f11, and so on.

- per-function drivers are matched to these devices by the kernel bus functionality

We chose this approach because almost all RMI4 functions are independent of one another. The sole exception is F01, and its primary interaction with other functions is to notify them of the need to read or write data from or to the sensor.

This structure eliminates the ad hoc device matching that was present in our previous driver submissions. It also enables easy addition of support for additional RMI4 functions, either by Synaptics or by third parties.

Comments and other feedback on this driver are welcomed.

Bill Manson
Allie Xiong
Christopher Heiny

Cc Jean Delvare <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Naveen Kumar Gaddipati <[email protected]>
Cc Abraham Arce <[email protected]>

---