diff options
| author | AnilKumar Ch <anilkumar@ti.com> | 2012-11-21 01:49:31 -0500 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-11-21 01:55:10 -0500 |
| commit | 4a83eecff65bd327bf5cb3b400b96fa975c73308 (patch) | |
| tree | 78e4fabcc1cc60875a6a557a215bc93c110e4536 /Documentation/devicetree | |
| parent | 5383116b86d8e877684770d05acd1dda62be102d (diff) | |
Input: matrix-keypad - add device tree support
Also the driver was modifued to take advantage of recent improvements in
matrix_keypad_build_keymap() implementation, which automatically allocates
memory for keymap.
The driver was tested on AM335x EVM.
Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'Documentation/devicetree')
| -rw-r--r-- | Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt b/Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt new file mode 100644 index 000000000000..ead641c65e0a --- /dev/null +++ b/Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | * GPIO driven matrix keypad device tree bindings | ||
| 2 | |||
| 3 | GPIO driven matrix keypad is used to interface a SoC with a matrix keypad. | ||
| 4 | The matrix keypad supports multiple row and column lines, a key can be | ||
| 5 | placed at each intersection of a unique row and a unique column. The matrix | ||
| 6 | keypad can sense a key-press and key-release by means of GPIO lines and | ||
| 7 | report the event using GPIO interrupts to the cpu. | ||
| 8 | |||
| 9 | Required Properties: | ||
| 10 | - compatible: Should be "gpio-matrix-keypad" | ||
| 11 | - row-gpios: List of gpios used as row lines. The gpio specifier | ||
| 12 | for this property depends on the gpio controller to | ||
| 13 | which these row lines are connected. | ||
| 14 | - col-gpios: List of gpios used as column lines. The gpio specifier | ||
| 15 | for this property depends on the gpio controller to | ||
| 16 | which these column lines are connected. | ||
| 17 | - linux,keymap: The definition can be found at | ||
| 18 | bindings/input/matrix-keymap.txt | ||
| 19 | |||
| 20 | Optional Properties: | ||
| 21 | - linux,no-autorepeat: do no enable autorepeat feature. | ||
| 22 | - linux,wakeup: use any event on keypad as wakeup event. | ||
| 23 | - debounce-delay-ms: debounce interval in milliseconds | ||
| 24 | - col-scan-delay-us: delay, measured in microseconds, that is needed | ||
| 25 | before we can scan keypad after activating column gpio | ||
| 26 | |||
| 27 | Example: | ||
| 28 | matrix-keypad { | ||
| 29 | compatible = "gpio-matrix-keypad"; | ||
| 30 | debounce-delay-ms = <5>; | ||
| 31 | col-scan-delay-us = <2>; | ||
| 32 | |||
| 33 | row-gpios = <&gpio2 25 0 | ||
| 34 | &gpio2 26 0 | ||
| 35 | &gpio2 27 0>; | ||
| 36 | |||
| 37 | col-gpios = <&gpio2 21 0 | ||
| 38 | &gpio2 22 0>; | ||
| 39 | |||
| 40 | linux,keymap = <0x0000008B | ||
| 41 | 0x0100009E | ||
| 42 | 0x02000069 | ||
| 43 | 0x0001006A | ||
| 44 | 0x0101001C | ||
| 45 | 0x0201006C>; | ||
| 46 | }; | ||
