All of lore.kernel.org
 help / color / mirror / Atom feed
From: mathieu.poirier@linaro.org
To: grant.likely@linaro.org
Cc: devicetree-discuss@lists.ozlabs.org, dmitry.torokhov@gmail.com,
	john.stultz@linaro.org, kernel-team@android.com,
	linux-input@vger.kernel.org
Subject: [PATCH 1/2] Input: Add device tree bindings for input keys
Date: Thu, 27 Jun 2013 10:13:24 -0600	[thread overview]
Message-ID: <1372349605-4500-1-git-send-email-mathieu.poirier@linaro.org> (raw)

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


             reply	other threads:[~2013-06-27 16:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-27 16:13 mathieu.poirier [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1372349605-4500-1-git-send-email-mathieu.poirier@linaro.org \
    --to=mathieu.poirier@linaro.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=grant.likely@linaro.org \
    --cc=john.stultz@linaro.org \
    --cc=kernel-team@android.com \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.