Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/input/allwinner,sun4i-a10-lradc-keys.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Allwinner A10 LRADC Device Tree Bindings
8
9maintainers:
10 - Chen-Yu Tsai <wens@csie.org>
11 - Maxime Ripard <mripard@kernel.org>
12
13properties:
14 compatible:
15 oneOf:
16 - const: allwinner,sun4i-a10-lradc-keys
17 - const: allwinner,sun8i-a83t-r-lradc
18 - items:
19 - const: allwinner,sun50i-a64-lradc
20 - const: allwinner,sun8i-a83t-r-lradc
21
22 reg:
23 maxItems: 1
24
25 interrupts:
26 maxItems: 1
27
28 vref-supply:
29 description:
30 Regulator for the LRADC reference voltage
31
32 wakeup-source: true
33
34patternProperties:
35 "^button-[0-9]+$":
36 type: object
37 properties:
38 label:
39 $ref: /schemas/types.yaml#/definitions/string
40 description: Descriptive name of the key
41
42 linux,code:
43 $ref: /schemas/types.yaml#/definitions/uint32
44 description: Keycode to emit
45
46 channel:
47 $ref: /schemas/types.yaml#/definitions/uint32
48 enum: [0, 1]
49 description: ADC Channel this key is attached to
50
51 voltage:
52 $ref: /schemas/types.yaml#/definitions/uint32
53 description:
54 Voltage in microvolts at LRADC input when this key is
55 pressed
56
57 required:
58 - label
59 - linux,code
60 - channel
61 - voltage
62
63 additionalProperties: false
64
65required:
66 - compatible
67 - reg
68 - interrupts
69 - vref-supply
70
71additionalProperties: false
72
73examples:
74 - |
75 lradc: lradc@1c22800 {
76 compatible = "allwinner,sun4i-a10-lradc-keys";
77 reg = <0x01c22800 0x100>;
78 interrupts = <31>;
79 vref-supply = <®_vcc3v0>;
80
81 button-191 {
82 label = "Volume Up";
83 linux,code = <115>;
84 channel = <0>;
85 voltage = <191274>;
86 };
87
88 button-392 {
89 label = "Volume Down";
90 linux,code = <114>;
91 channel = <0>;
92 voltage = <392644>;
93 };
94 };
95
96...