AB8500 Fuel Gauge
Schema identifier ($id): "http://devicetree.org/schemas/power/supply/stericsson,ab8500-fg.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Sebastian Reichel <sre@kernel.org>"
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):power-supply.yaml#
Properties and child nodes (properties) #
compatible — required here #
Exact value (const): "stericsson,ab8500-fg"
monitored-battery — required here #
true — No constraints added by this property rule.
battery — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle
Deprecated (deprecated): true
line-impedance-micro-ohms — not listed as required here #
The line impedance between the battery and the AB8500 inputs, to compensate for this when determining internal resistance.
interrupts — required here #
Maximum number of items (maxItems): 5
interrupt-names — required here #
Array item rules (items) #
Item 1
Exact value (
const):"NCONV_ACCU"
Item 2
Exact value (
const):"BATT_OVV"
Item 3
Exact value (
const):"LOW_BAT_F"
Item 4
Exact value (
const):"CC_INT_CALIB"
Item 5
Exact value (
const):"CCEOC"
io-channels — required here #
Maximum number of items (maxItems): 1
io-channel-names — required here #
Array item rules (items) #
Item 1
Exact value (
const):"main_bat_v"
Required in this object (required): "compatible", "monitored-battery", "interrupts", "interrupt-names", "io-channels", "io-channel-names"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/interrupt-controller/irq.h>
pmic {
fuel-gauge {
compatible = "stericsson,ab8500-fg";
monitored-battery = <&battery>;
interrupts = <24 IRQ_TYPE_LEVEL_HIGH>,
<8 IRQ_TYPE_LEVEL_HIGH>,
<28 IRQ_TYPE_LEVEL_HIGH>,
<27 IRQ_TYPE_LEVEL_HIGH>,
<26 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "NCONV_ACCU",
"BATT_OVV",
"LOW_BAT_F",
"CC_INT_CALIB",
"CCEOC";
io-channels = <&gpadc 0x08>;
io-channel-names = "main_bat_v";
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: GPL-2.0
Line 2: Copyright (C) 2021 Sebastian Reichel