adi,ltc3337 (on i2c bus)

Description

Analog Devices LTC3337 primary battery state of health monitor with
precision coulomb counter.

The chip counts the charge drawn from the battery. It does not know the capacity of the
battery, so the count is reported as FUEL_GAUGE_CONSUMED_CAPACITY_UAH, and
FUEL_GAUGE_REMAINING_CAPACITY_UAH is not supported. The counter has 16 bits: choose the
prescaler (FUEL_GAUGE_CC_CONFIG) so that it covers the capacity of the battery and does not
wrap during its life.

The chip has no flag that tells when the automatic conversions have completed, and their
result registers read zero after power up. The voltage is not available (-ENODATA) while the
BAT_IN result is zero, and the temperature while the die temperature code is zero. A zero
result is outside the operating range of the chip (BAT_IN of 1.8 V to 5.5 V, die temperature
of -40 degC to 125 degC, code zero being -41 degC), so it is taken as "no conversion yet".
The first voltage result can take a few seconds after power up when the load is very low.
Both are also not available while the coulomb counter is shut down through
FUEL_GAUGE_CC_CONFIG, because they are then only updated by a conversion that the driver
does not start.

Properties

Properties not inherited from the base binding file.

Name

Type

Details

ipeak-milliamp

int

Peak input current selected by the IPK[2:0] pins (datasheet Table 1).
The pins are hard wired, so this value must match the board. It sets
the charge represented by one counter LSB. The driver compares it with
the pin state read back from the chip and fails to initialize on a mismatch.

This property is required.

Legal values: 5, 10, 15, 20, 25, 50, 75, 100

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.