1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: "http://devicetree.org/schemas/power/supply/lltc,ltc294x.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
title: Binding for LTC2941, LTC2942, LTC2943 and LTC2944 battery fuel gauges
description: |
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:
- Sebastian Reichel <sre@kernel.org>
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
enum:
- lltc,ltc2941
- lltc,ltc2942
- lltc,ltc2943
- lltc,ltc2944
reg:
maxItems: 1
lltc,resistor-sense:
$ref: /schemas/types.yaml#/definitions/int32
description: |
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:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
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:
- compatible
- reg
- lltc,resistor-sense
- lltc,prescaler-exponent
additionalProperties: false
examples:
- |
i2c0 {
#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 */
};
};
|