LTC2941, LTC2942, LTC2943 and LTC2944 battery fuel gauges

Schema identifier ($id): "http://devicetree.org/schemas/power/supply/lltc,ltc294x.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

All chips measure battery capacity. The LTC2942 is pin compatible with the LTC2941, it adds voltage and temperature monitoring, and is runtime detected. LTC2943 and LTC2944 are software compatible, uses a slightly different conversion formula for the charge counter and adds voltage, current and temperature monitoring.

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 #

Allowed values (enum): "lltc,ltc2941", "lltc,ltc2942", "lltc,ltc2943", "lltc,ltc2944"

reg — required here #

Maximum number of items (maxItems): 1

lltc,resistor-sense — required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/int32

Sense resistor value in milli-ohms. Can be negative value when the battery has been connected to the wrong end of the resistor.

lltc,prescaler-exponent — required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

The prescaler exponent as explained in the datasheet. This determines the range and accuracy of the gauge. The value is programmed into the chip only if it differs from the current setting. The setting is lost when the battery is disconnected.

Required in this object (required): "compatible", "reg", "lltc,resistor-sense", "lltc,prescaler-exponent"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

i2c {
  #address-cells = <1>;
  #size-cells = <0>;
  battery@64 {
    compatible = "lltc,ltc2943";
    reg = <0x64>;
    lltc,resistor-sense = <15>;
    lltc,prescaler-exponent = <5>; /* 2^(2*5) = 1024 */
  };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0

Edit this page