adi,ltc2941 (on i2c bus)

Description

Analog Devices LTC2941 battery gas gauge / coulomb counter.

The device integrates current through an external sense resistor and stores
a 16-bit accumulated charge. It does not measure voltage, current, or
temperature (those features belong to LTC2942 and later).

STATUS bits other than the chip ID clear on read once the cause is gone.
Initialization reads STATUS and therefore consumes a latched UVLO. The
driver returns that bit on the next FUEL_GAUGE_STATUS or FUEL_GAUGE_FLAGS
read, then clears it.

Properties

Properties not inherited from the base binding file.

Name

Type

Details

rsense-milliohms

int

External sense resistor in milliohms, between SENSE+ and SENSE-.
Charge LSB is qLSB = 0.085 mAh * (50 mOhm / rsense) * (M / 128),
where M is the coulomb-counter prescaler. The datasheet example and
the +/-50 mV sense range use 50 mOhm for a 1 A application.

This property is required.

prescaler

int

Coulomb counter prescaler M (control register B[5:3]).
Default 128 matches the LTC2941 power-on value (B[5:3] = 111).

Default value: 128

Legal values: 1, 2, 4, 8, 16, 32, 64, 128

design-capacity-microamp-hours

int

Battery design capacity in microamp-hours. Used to report
FUEL_GAUGE_DESIGN_CAPACITY and state-of-charge. Omit this property
if the host will program accumulated charge against the 16-bit
full-scale range only.

In charge-complete mode (control B[2:1] = 01), a high level on AL/CC
sets the accumulated-charge register to 0xFFFF to mark a full battery.
Remaining capacity then counts down from this design capacity by qLSB.
Outside that mode the register is a raw coulomb count.

supply-gpios

phandle-array

GPIO specifier that controls power to the device.

This property should be provided when the device has a dedicated
switch that controls power to the device.  The supply state is
entirely the responsibility of the device driver.

Contrast with vin-supply.

vin-supply

phandle

Reference to the regulator that controls power to the device.
The referenced devicetree node must have a regulator compatible.

This property should be provided when device power is supplied
by a shared regulator.  The supply state is dependent on the
request status of all devices fed by the regulator.

Contrast with supply-gpios.  If both properties are provided
then the regulator must be requested before the supply GPIOS is
set to an active state, and the supply GPIOS must be set to an
inactive state before releasing the regulator.