Skip to contentSkip to conversation

input: dts: Add commonly used event types

PATCH RESEND In review Alexander Shiyan 2 participants 4 messages Mar 18, 2014 – Mar 28, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 input: dts: Add commonly used event types

Patch adds commonly used event types (EV_KEY and EV_SW) to devicetree bindings header for input subsystem.

---
 include/dt-bindings/input/input.h | 3 +++
 1 file changed, 3 insertions(+)
include/dt-bindings/input/input.h +3 -0
index 042e7b3..3a141d92 100644
@@ -9,6 +9,9 @@
 #ifndef _DT_BINDINGS_INPUT_INPUT_H
 #define _DT_BINDINGS_INPUT_INPUT_H
 
+#define EV_KEY			0x01
+#define EV_SW			0x05
+
 #define KEY_RESERVED		0
 #define KEY_ESC			1
 #define KEY_1			2
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH v3 2/2 input: clps711x-keypad: dts: Add bindings documentation

This patch adds the devicetree documentation for the Cirrus Logic CLPS711X keypad.

---
 .../devicetree/bindings/input/clps711x-keypad.txt  | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/clps711x-keypad.txt
Documentation/devicetree/bindings/input/clps711x-keypad.txt new file +27 -0
new file mode 100644
index 0000000..93fa2c1
@@ -0,0 +1,27 @@
+* Cirrus Logic CLPS711X matrix keypad device tree bindings
+
+Required Properties:
+- compatible:    Shall contain "cirrus,clps711x-keypad".
+- row-gpios:     List of GPIOs used as row lines.
+- poll-interval: Poll interval time in milliseconds.
+- linux,keymap:  The definition can be found at
+                 bindings/input/matrix-keymap.txt.
+
+Optional Properties:
+- autorepeat:    Enable autorepeat feature.
+
+Example:
+	keypad {
+		compatible = "cirrus,ep7312-keypad", "cirrus,clps711x-keypad";
+		autorepeat;
+		poll-interval = <120>;
+		row-gpios = <&porta 0 0>,
+			    <&porta 1 0>;
+
+		linux,keymap = <
+			MATRIX_KEY(0, 0, KEY_UP)
+			MATRIX_KEY(0, 1, KEY_DOWN)
+			MATRIX_KEY(1, 0, KEY_LEFT)
+			MATRIX_KEY(1, 1, KEY_RIGHT)
+		>;
+	};
Signature · 1 line
1.8.3.2
maintainer Applied
#2 lore raw

Re: [PATCH v3 2/2] input: clps711x-keypad: dts: Add bindings documentation

Quoted 4 lines · Alexander Shiyan

This patch adds the devicetree documentation for the Cirrus Logic CLPS711X keypad.

I picked this one up and folded into the driver patch.

Quoted 41 lines
---
 .../devicetree/bindings/input/clps711x-keypad.txt  | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/clps711x-keypad.txt
Documentation/devicetree/bindings/input/clps711x-keypad.txt new file +27 -0
new file mode 100644
index 0000000..93fa2c1
@@ -0,0 +1,27 @@
+* Cirrus Logic CLPS711X matrix keypad device tree bindings
+
+Required Properties:
+- compatible:    Shall contain "cirrus,clps711x-keypad".
+- row-gpios:     List of GPIOs used as row lines.
+- poll-interval: Poll interval time in milliseconds.
+- linux,keymap:  The definition can be found at
+                 bindings/input/matrix-keymap.txt.
+
+Optional Properties:
+- autorepeat:    Enable autorepeat feature.
+
+Example:
+	keypad {
+		compatible = "cirrus,ep7312-keypad", "cirrus,clps711x-keypad";
+		autorepeat;
+		poll-interval = <120>;
+		row-gpios = <&porta 0 0>,
+			    <&porta 1 0>;
+
+		linux,keymap = <
+			MATRIX_KEY(0, 0, KEY_UP)
+			MATRIX_KEY(0, 1, KEY_DOWN)
+			MATRIX_KEY(1, 0, KEY_LEFT)
+			MATRIX_KEY(1, 1, KEY_RIGHT)
+		>;
+	};
Signature · 1 line
1.8.3.2
Signature · 1 line
Dmitry
maintainer
#3 lore raw
In reply to Alexander Shiyan
Quoted 25 lines · Alexander Shiyan

Patch adds commonly used event types (EV_KEY and EV_SW) to devicetree bindings header for input subsystem.

---
 include/dt-bindings/input/input.h | 3 +++
 1 file changed, 3 insertions(+)
include/dt-bindings/input/input.h +3 -0
index 042e7b3..3a141d92 100644
@@ -9,6 +9,9 @@
 #ifndef _DT_BINDINGS_INPUT_INPUT_H
 #define _DT_BINDINGS_INPUT_INPUT_H
 
+#define EV_KEY			0x01
+#define EV_SW			0x05
+
 #define KEY_RESERVED		0
 #define KEY_ESC			1
 #define KEY_1			2
Signature · 1 line
1.8.3.2

This I believe should go through device tree.

Signature · 1 line
Dmitry