diff options
author | Simon Glass <sjg@chromium.org> | 2013-01-10 20:41:32 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2013-02-08 07:58:40 -0500 |
commit | 1d0b1c74ed22d2614ae9206febf956f0b22c81a5 (patch) | |
tree | 35f09caab89441276ce6cfd28437faf26cdb7d35 /Documentation/devicetree | |
parent | d2f4ec1026fecbef9b72cc899a626516ef3f265f (diff) |
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.
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.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'Documentation/devicetree')
4 files changed, 23 insertions, 13 deletions
diff --git a/Documentation/devicetree/bindings/input/lpc32xx-key.txt b/Documentation/devicetree/bindings/input/lpc32xx-key.txt index 31afd5014c48..bcf62f856358 100644 --- a/Documentation/devicetree/bindings/input/lpc32xx-key.txt +++ b/Documentation/devicetree/bindings/input/lpc32xx-key.txt | |||
@@ -1,19 +1,22 @@ | |||
1 | NXP LPC32xx Key Scan Interface | 1 | NXP LPC32xx Key Scan Interface |
2 | 2 | ||
3 | This binding is based on the matrix-keymap binding with the following | ||
4 | changes: | ||
5 | |||
3 | Required Properties: | 6 | Required Properties: |
4 | - compatible: Should be "nxp,lpc3220-key" | 7 | - compatible: Should be "nxp,lpc3220-key" |
5 | - reg: Physical base address of the controller and length of memory mapped | 8 | - reg: Physical base address of the controller and length of memory mapped |
6 | region. | 9 | region. |
7 | - interrupts: The interrupt number to the cpu. | 10 | - interrupts: The interrupt number to the cpu. |
8 | - keypad,num-rows: Number of rows and columns, e.g. 1: 1x1, 6: 6x6 | ||
9 | - keypad,num-columns: Must be equal to keypad,num-rows since LPC32xx only | ||
10 | supports square matrices | ||
11 | - nxp,debounce-delay-ms: Debounce delay in ms | 11 | - nxp,debounce-delay-ms: Debounce delay in ms |
12 | - nxp,scan-delay-ms: Repeated scan period in ms | 12 | - nxp,scan-delay-ms: Repeated scan period in ms |
13 | - linux,keymap: the key-code to be reported when the key is pressed | 13 | - linux,keymap: the key-code to be reported when the key is pressed |
14 | and released, see also | 14 | and released, see also |
15 | Documentation/devicetree/bindings/input/matrix-keymap.txt | 15 | Documentation/devicetree/bindings/input/matrix-keymap.txt |
16 | 16 | ||
17 | Note: keypad,num-rows and keypad,num-columns are required, and must be equal | ||
18 | since LPC32xx only supports square matrices | ||
19 | |||
17 | Example: | 20 | Example: |
18 | 21 | ||
19 | key@40050000 { | 22 | key@40050000 { |
diff --git a/Documentation/devicetree/bindings/input/matrix-keymap.txt b/Documentation/devicetree/bindings/input/matrix-keymap.txt index 3cd8b98ccd2d..c54919fad17e 100644 --- a/Documentation/devicetree/bindings/input/matrix-keymap.txt +++ b/Documentation/devicetree/bindings/input/matrix-keymap.txt | |||
@@ -9,6 +9,12 @@ Required properties: | |||
9 | row << 24 | column << 16 | key-code | 9 | row << 24 | column << 16 | key-code |
10 | 10 | ||
11 | Optional properties: | 11 | Optional properties: |
12 | Properties for the number of rows and columns are optional because some | ||
13 | drivers will use fixed values for these. | ||
14 | - keypad,num-rows: Number of row lines connected to the keypad controller. | ||
15 | - keypad,num-columns: Number of column lines connected to the keypad | ||
16 | controller. | ||
17 | |||
12 | Some users of this binding might choose to specify secondary keymaps for | 18 | Some users of this binding might choose to specify secondary keymaps for |
13 | cases where there is a modifier key such as a Fn key. Proposed names | 19 | cases where there is a modifier key such as a Fn key. Proposed names |
14 | for said properties are "linux,fn-keymap" or with another descriptive | 20 | for said properties are "linux,fn-keymap" or with another descriptive |
@@ -17,3 +23,5 @@ word for the modifier other from "Fn". | |||
17 | Example: | 23 | Example: |
18 | linux,keymap = < 0x00030012 | 24 | linux,keymap = < 0x00030012 |
19 | 0x0102003a >; | 25 | 0x0102003a >; |
26 | keypad,num-rows = <2>; | ||
27 | keypad,num-columns = <8>; | ||
diff --git a/Documentation/devicetree/bindings/input/omap-keypad.txt b/Documentation/devicetree/bindings/input/omap-keypad.txt index f2fa5e10493d..34ed1c60ff95 100644 --- a/Documentation/devicetree/bindings/input/omap-keypad.txt +++ b/Documentation/devicetree/bindings/input/omap-keypad.txt | |||
@@ -6,19 +6,16 @@ A key can be placed at each intersection of a unique row and a unique column. | |||
6 | The keypad controller can sense a key-press and key-release and report the | 6 | The keypad controller can sense a key-press and key-release and report the |
7 | event using a interrupt to the cpu. | 7 | event using a interrupt to the cpu. |
8 | 8 | ||
9 | This binding is based on the matrix-keymap binding with the following | ||
10 | changes: | ||
11 | |||
12 | keypad,num-rows and keypad,num-columns are required. | ||
13 | |||
9 | Required SoC Specific Properties: | 14 | Required SoC Specific Properties: |
10 | - compatible: should be one of the following | 15 | - compatible: should be one of the following |
11 | - "ti,omap4-keypad": For controllers compatible with omap4 keypad | 16 | - "ti,omap4-keypad": For controllers compatible with omap4 keypad |
12 | controller. | 17 | controller. |
13 | 18 | ||
14 | Required Board Specific Properties, in addition to those specified by | ||
15 | the shared matrix-keyboard bindings: | ||
16 | - keypad,num-rows: Number of row lines connected to the keypad | ||
17 | controller. | ||
18 | |||
19 | - keypad,num-columns: Number of column lines connected to the | ||
20 | keypad controller. | ||
21 | |||
22 | Optional Properties specific to linux: | 19 | Optional Properties specific to linux: |
23 | - linux,keypad-no-autorepeat: do no enable autorepeat feature. | 20 | - linux,keypad-no-autorepeat: do no enable autorepeat feature. |
24 | 21 | ||
diff --git a/Documentation/devicetree/bindings/input/tca8418_keypad.txt b/Documentation/devicetree/bindings/input/tca8418_keypad.txt index 2a1538f0053f..255185009167 100644 --- a/Documentation/devicetree/bindings/input/tca8418_keypad.txt +++ b/Documentation/devicetree/bindings/input/tca8418_keypad.txt | |||
@@ -1,8 +1,10 @@ | |||
1 | This binding is based on the matrix-keymap binding with the following | ||
2 | changes: | ||
3 | |||
4 | keypad,num-rows and keypad,num-columns are required. | ||
1 | 5 | ||
2 | Required properties: | 6 | Required properties: |
3 | - compatible: "ti,tca8418" | 7 | - compatible: "ti,tca8418" |
4 | - reg: the I2C address | 8 | - reg: the I2C address |
5 | - interrupts: IRQ line number, should trigger on falling edge | 9 | - interrupts: IRQ line number, should trigger on falling edge |
6 | - keypad,num-rows: The number of rows | ||
7 | - keypad,num-columns: The number of columns | ||
8 | - linux,keymap: Keys definitions, see keypad-matrix. | 10 | - linux,keymap: Keys definitions, see keypad-matrix. |