Skip to contentSkip to conversation

input synaptics-rmi4: Add F30 support

PATCH Superseded Christopher Heiny 1 participant 1 message Feb 24, 2014

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 input synaptics-rmi4: Add F30 support

RMI4 Function 0x30 provides support for GPIOs, LEDs and mechanical buttons. In particular, the mechanical button support is used in an increasing number of touchpads.

Cc Dmitry Torokhov <[email protected]>
Cc Benjamin Tissoires <[email protected]>
Cc Linux Walleij <[email protected]>
Cc David Herrmann <[email protected]>
Cc Jiri Kosina <[email protected]>

---

 drivers/input/rmi4/Kconfig   |  12 +
 drivers/input/rmi4/Makefile  |   1 +
 drivers/input/rmi4/rmi_f30.c | 618 +++++++++++++++++++++++++++++++++++++++++++
 include/linux/rmi.h          |   7 +-
 4 files changed, 637 insertions(+), 1 deletion(-)
drivers/input/rmi4/Kconfig +12 -0
index d0c7b6e..14d5f49 100644
@@ -63,3 +63,15 @@ config RMI4_F11_PEN
 	  If your system is not recognizing pen touches and you know your
 	  sensor supports pen input, you probably want to turn this feature
 	  off.
+
+config RMI4_F30
+        tristate "RMI4 Function 30 (GPIO LED)"
+        depends on RMI4_CORE
+        help
+          Say Y here if you want to add support for RMI4 function 30.
+
+          Function 30 provides GPIO and LED support for RMI4 devices. This
+	  includes support for buttons on TouchPads and ClickPads.
+
+          To compile this driver as a module, choose M here: the
+          module will be called rmi-f30.
drivers/input/rmi4/Makefile +1 -0
index 5c6bad5..ecffd72 100644
@@ -3,6 +3,7 @@ rmi_core-y := rmi_bus.o rmi_driver.o rmi_f01.o
 
 # Function drivers
 obj-$(CONFIG_RMI4_F11) += rmi_f11.o
+obj-$(CONFIG_RMI4_F30) += rmi_f30.o
 
 # Transports
 obj-$(CONFIG_RMI4_I2C) += rmi_i2c.o
drivers/input/rmi4/rmi_f30.c new file +618 -0

618 lines not on this page · raw message

include/linux/rmi.h +6 -1
index 735e978..889a627 100644
@@ -139,9 +139,14 @@ struct rmi_button_map {
 	u8 *map;
 };
 
+struct rmi_f30_button {
+	u16 button;
+	int sense;
+};
+
 struct rmi_f30_gpioled_map {
 	u8 ngpioleds;
-	u8 *map;
+	struct rmi_f30_button *map;
 };
 
 /**