Allwinner A10 LRADC
Schema identifier ($id): "http://devicetree.org/schemas/input/allwinner,sun4i-a10-lradc-keys.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Chen-Yu Tsai <wens@csie.org>", "Maxime Ripard <mripard@kernel.org>"
Properties and child nodes (properties) #
compatible — required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Exact value (
const):"allwinner,sun4i-a10-lradc-keys"
Rule 2
Exact value (
const):"allwinner,sun8i-a83t-r-lradc"
Rule 3
Array item rules (
items)Item 1
Allowed values (
enum):"allwinner,suniv-f1c100s-lradc","allwinner,sun50i-a64-lradc"Item 2
Exact value (
const):"allwinner,sun8i-a83t-r-lradc"
Rule 4
Exact value (
const):"allwinner,sun50i-r329-lradc"
Rule 5
Array item rules (
items)Item 1
Allowed values (
enum):"allwinner,sun50i-h616-lradc","allwinner,sun20i-d1-lradc"Item 2
Exact value (
const):"allwinner,sun50i-r329-lradc"
reg — required here #
Maximum number of items (maxItems): 1
clocks — not listed as required here #
Maximum number of items (maxItems): 1
resets — not listed as required here #
Maximum number of items (maxItems): 1
interrupts — required here #
Maximum number of items (maxItems): 1
vref-supply — required here #
Regulator for the LRADC reference voltage
wakeup-source — not listed as required here #
true — No constraints added by this property rule.
Properties matching a name pattern (patternProperties) #
^button-[0-9]+$ — name matches this regular expression #
Value type (type): "object"
Shared schema rule ($ref): input.yaml#
Properties and child nodes (properties) #
label — required here
Descriptive name of the key
linux,code — required here
true — No constraints added by this property rule.
channel — required here
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
ADC Channel this key is attached to
voltage — required here
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Voltage in microvolts at LRADC input when this key is pressed
Required in this object (required): "label", "linux,code", "channel", "voltage"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Required in this object (required): "compatible", "reg", "interrupts", "vref-supply"
Condition (if) #
Properties and child nodes (
properties) #
compatible— not listed as required here #Rule for matching array elements (
contains)
When the condition matches (then) #
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
lradc: lradc@1c22800 {
compatible = "allwinner,sun4i-a10-lradc-keys";
reg = <0x01c22800 0x100>;
interrupts = <31>;
vref-supply = <®_vcc3v0>;
button-191 {
label = "Volume Up";
linux,code = <115>;
channel = <0>;
voltage = <191274>;
};
button-392 {
label = "Volume Down";
linux,code = <114>;
channel = <0>;
voltage = <392644>;
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: GPL-2.0