Ingenic JZ47xx battery
Schema identifier ($id): "http://devicetree.org/schemas/power/supply/ingenic,battery.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Artur Rojek <contact@artur-rojek.eu>"
Shared schema rule ($ref): power-supply.yaml#
Properties and child nodes (properties) #
compatible — required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Exact value (
const):"ingenic,jz4740-battery"
Rule 2
Array item rules (
items)Item 1
Allowed values (
enum):"ingenic,jz4725b-battery","ingenic,jz4770-battery"Item 2
Exact value (
const):"ingenic,jz4740-battery"
io-channels — required here #
Maximum number of items (maxItems): 1
io-channel-names — required here #
Exact value (const): "battery"
monitored-battery — required here #
This property must be a phandle to a node using the format described in battery.yaml, with the following properties being required: - voltage-min-design-microvolt: drained battery voltage, - voltage-max-design-microvolt: fully charged battery voltage.
Required in this object (required): "compatible", "io-channels", "io-channel-names", "monitored-battery"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/iio/adc/ingenic,adc.h>
simple_battery: battery {
compatible = "simple-battery";
voltage-min-design-microvolt = <3600000>;
voltage-max-design-microvolt = <4200000>;
};
ingenic-battery {
compatible = "ingenic,jz4740-battery";
io-channels = <&adc INGENIC_ADC_BATTERY>;
io-channel-names = "battery";
monitored-battery = <&simple_battery>;
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
Line 2: Copyright 2019-2020 Artur Rojek