All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Input: Add device tree bindings for input keys
@ 2013-06-27 16:13 mathieu.poirier
  2013-06-27 16:13 ` [PATCH 2/2] Input: Adding DT support for keyreset tuneables mathieu.poirier
  0 siblings, 1 reply; 16+ messages in thread
From: mathieu.poirier @ 2013-06-27 16:13 UTC (permalink / raw)
  To: grant.likely
  Cc: devicetree-discuss, dmitry.torokhov, john.stultz, kernel-team,
	linux-input

From: "Mathieu J. Poirier" <mathieu.poirier@linaro.org>

This adds a simple device tree binding for the specification of
key sequences.  Definition of the keys found in the sequence are
located in 'include/uapi/linux/input.h'.

A keyset can be applied to a single device or the system as a
whole, depending on the associated driver.  An extention is also
provided for the definition of multiple keysets.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
---
 .../devicetree/bindings/input/input-keyset.txt     |   78 ++++++++++++++++++++
 1 file changed, 78 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/input-keyset.txt

diff --git a/Documentation/devicetree/bindings/input/input-keyset.txt b/Documentation/devicetree/bindings/input/input-keyset.txt
new file mode 100644
index 0000000..4f96299
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/input-keyset.txt
@@ -0,0 +1,78 @@
+Input: keyset
+
+A simple binding to represent a set of keys as described in
+include/uapi/linux/input.h.  This is targeted at devices that want
+to react to certain key combination being pressed or need to
+perform some configuration based on a set of input keys.
+
+It can also be used in a scenario where the system has a whole
+needs to respond to a specific sequence of keys.
+
+Required properties:
+ - linux,input-keyset: An array of 1-cell entries representing the
+   values associated with the KEY_xyz #defines found in input.h.
+
+Example1:
+Applicable to a specific device:
+
+        matrix-keypad {
+                compatible = "gpio-matrix-keypad";
+                debounce-delay-ms = <5>;
+                col-scan-delay-us = <2>;
+
+                row-gpios = <&gpio2 25 0
+                             &gpio2 26 0
+                             &gpio2 27 0>;
+
+                col-gpios = <&gpio2 21 0
+                             &gpio2 22 0
+                             &gpio2 23 0>;
+
+                linux,keymap = <0x00000002
+                                0x01000005
+                                0x02000008
+                                0x00010003
+                                0x01010006
+                                0x02010009
+                                0x00020004
+                                0x01020007
+                                0x0202000a>;
+
+                linux,keyset = <0x04
+                                0x05
+                                0x0a>;
+        };
+
+Example2:
+Used as a system-wide parameter:
+
+	sysrq {
+		linux,input-keyset = <0x01
+				      0x0A
+				      0x19>;
+		timout-ms = <3000>;
+	};
+
+Would represent KEY_1, KEY_9 and KEY_P.
+
+Example3:
+Binding used when multiple declarations are needed:
+
+acme_keysets {
+        keyset0 {
+                linux,input-keyset = <0x01
+                                      0x02
+                                      0x03>;
+        };
+        keyset1 {
+                linux,input-keyset = <0x04
+                                      0x05
+                                      0x06>;
+        };
+        keyset2 {
+                linux,input-keyset = <0x07
+                                      0x08
+                                      0x09>;
+        };
+
+};
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-07-10 22:55 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-27 16:13 [PATCH 1/2] Input: Add device tree bindings for input keys mathieu.poirier
2013-06-27 16:13 ` [PATCH 2/2] Input: Adding DT support for keyreset tuneables mathieu.poirier
2013-06-27 16:28   ` Dmitry Torokhov
2013-06-27 16:28     ` Dmitry Torokhov
2013-06-27 17:56     ` Mathieu Poirier
2013-06-27 18:25       ` Dmitry Torokhov
2013-06-27 18:42         ` Mathieu Poirier
2013-06-28  6:09           ` Dmitry Torokhov
2013-06-28 13:19             ` Mathieu Poirier
2013-07-10 15:14               ` Grant Likely
2013-07-10 16:52                 ` Dmitry Torokhov
     [not found]                   ` <20130710165247.GA22992-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
2013-07-10 21:35                     ` Mathieu Poirier
2013-07-10 21:50                   ` Grant Likely
2013-07-10 22:20                     ` Dmitry Torokhov
     [not found]                       ` <3572203.AkEVm8LFzu-wUGeVx6es1+Q2O5dskk9LyLysJ1jNyTM@public.gmane.org>
2013-07-10 22:29                         ` Mathieu Poirier
2013-07-10 22:55                           ` Dmitry Torokhov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.