aboutsummaryrefslogtreecommitdiff
path: root/dts/upstream/Bindings/input/samsung,s3c6410-keypad.yaml
blob: a53569aa0ee7741be0ddf55bd02e4596db5b161c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/samsung,s3c6410-keypad.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Samsung SoC series Keypad Controller

description:
  Samsung SoC Keypad controller is used to interface a SoC with a matrix-type
  keypad device. The keypad controller supports multiple row and column lines.
  A key can be placed at each intersection of a unique row and a unique column.
  The keypad controller can sense a key-press and key-release and report the
  event using a interrupt to the cpu.

maintainers:
  - Krzysztof Kozlowski <krzk@kernel.org>

properties:
  compatible:
    enum:
      - samsung,s3c6410-keypad
      - samsung,s5pv210-keypad

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  clock-names:
    items:
      - const: keypad

  interrupts:
    maxItems: 1

  wakeup-source: true

  linux,input-no-autorepeat:
    type: boolean
    description:
      Do no enable autorepeat feature.

  linux,input-wakeup:
    type: boolean
    deprecated: true

  samsung,keypad-num-columns:
    $ref: /schemas/types.yaml#/definitions/uint32
    description:
      Number of column lines connected to the keypad controller.

  samsung,keypad-num-rows:
    $ref: /schemas/types.yaml#/definitions/uint32
    description:
      Number of row lines connected to the keypad controller.

patternProperties:
  '^key-[0-9a-z]+$':
    type: object
    $ref: input.yaml#
    additionalProperties: false
    description:
      Each key connected to the keypad controller is represented as a child
      node to the keypad controller device node.

    properties:
      keypad,column:
        $ref: /schemas/types.yaml#/definitions/uint32
        description: The column number to which the key is connected.

      keypad,row:
        $ref: /schemas/types.yaml#/definitions/uint32
        description: The row number to which the key is connected.

      linux,code: true

    required:
      - keypad,column
      - keypad,row
      - linux,code

required:
  - compatible
  - reg
  - interrupts
  - samsung,keypad-num-columns
  - samsung,keypad-num-rows

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/exynos4.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    keypad@100a0000 {
        compatible = "samsung,s5pv210-keypad";
        reg = <0x100a0000 0x100>;
        interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
        clocks = <&clock CLK_KEYIF>;
        clock-names = "keypad";

        samsung,keypad-num-rows = <2>;
        samsung,keypad-num-columns = <8>;
        linux,input-no-autorepeat;
        wakeup-source;

        key-1 {
            keypad,row = <0>;
            keypad,column = <3>;
            linux,code = <2>;
        };

        key-2 {
            keypad,row = <0>;
            keypad,column = <4>;
            linux,code = <3>;
        };
    };