[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1356035039-21653-1-git-send-email-sjg@chromium.org>
Date: Thu, 20 Dec 2012 12:23:58 -0800
From: Simon Glass <sjg@...omium.org>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Simon Glass <sjg@...omium.org>, linux-input@...r.kernel.org,
Rob Landley <rob@...dley.net>,
Grant Likely <grant.likely@...retlab.ca>,
devicetree-discuss@...ts.ozlabs.org,
Roland Stigge <stigge@...com.de>, linux-doc@...r.kernel.org,
Vincent Palatin <vpalatin@...omium.org>,
Wolfram Sang <w.sang@...gutronix.de>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Felipe Balbi <balbi@...com>,
Sourav Poddar <sourav.poddar@...com>,
Luigi Semenzato <semenzato@...omium.org>,
Olof Johansson <olof@...om.net>,
Rob Herring <rob.herring@...xeda.com>,
Dmitry Torokhov <dtor@...l.ru>,
Stephen Warren <swarren@...dia.com>
Subject: [PATCH] RFC: input: Extend matrix-keypad device tree binding
Some matrix keypad drivers can support different numbers of rows and
columns. Add a generic binding for these.
Also define properties for the repeat rate, to allow a sane baseline to
be set up for the driver.
Implementation note:
In order to implement this binding in the kernel, we will need to modify
matrix_keypad_() to look up the number of rows and cols in
the keymap. Perhaps this could be done by passing 0 for these parameters?
Many of the parameters can already be set to NULL. Ick.
For the key repeat feature, we need to set this after the input device
is registered. So we would need to add a matrix_keypad_setup_input() or
similar to be called by the driver after input_register_device(). I am
less keen on that idea, and less again on the alternative of perhaps
matrix_keypad_register_device() which does input_register_device() and
then sets up the key repeat. Thoughts?
Signed-off-by: Simon Glass <sjg@...omium.org>
---
.../devicetree/bindings/input/matrix-keymap.txt | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/Documentation/devicetree/bindings/input/matrix-keymap.txt b/Documentation/devicetree/bindings/input/matrix-keymap.txt
index 3cd8b98..b953d27 100644
--- a/Documentation/devicetree/bindings/input/matrix-keymap.txt
+++ b/Documentation/devicetree/bindings/input/matrix-keymap.txt
@@ -9,6 +9,16 @@ Required properties:
row << 24 | column << 16 | key-code
Optional properties:
+Properties for the number of rows and columns are optional because some
+drivers will use fixed values for these.
+- keypad,num-rows: Number of row lines connected to the keypad controller.
+- keypad,num-columns: Number of column lines connected to the keypad
+ controller.
+- keypad,repeat-delay-ms: Number of milliseconds of delay before the first
+ keyboard repeat when a key is held down.
+- keypad,repeat-rate-ms: Number of milliseconds between each subsequent
+ keyboard repeat when a key is held down.
+
Some users of this binding might choose to specify secondary keymaps for
cases where there is a modifier key such as a Fn key. Proposed names
for said properties are "linux,fn-keymap" or with another descriptive
@@ -17,3 +27,7 @@ word for the modifier other from "Fn".
Example:
linux,keymap = < 0x00030012
0x0102003a >;
+ keypad,num-rows = <2>;
+ keypad,num-columns = <8>;
+ keypad,repeat-delay-ms = <600>;
+ keypad,repeat-rate-ms = <60>;
--
1.7.7.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists