Skip to content

Commit

Permalink
Add LTC2941/LTC2943 Battery Gauge Driver
Browse files Browse the repository at this point in the history
Both the LTC2941 and LTC2943 measure battery capacity.
The LTC2943 is compatible with the LTC2941, it adds voltage and
temperature monitoring, and uses a slightly different conversion
formula for the charge counter.

To avoid confusion with e.g. the LTC2945, the driver is called
LTC2941 instead of LTC294X.

v2: Fix units of measurement: uV, uA and centidegrees.
v3: Correctly set configuration register. Allow negative values
    for the sense resistor.
v4: Run checkpatch.pl and fix all errors and warnings.
v5: Prefix "lltc," to devicetree properties.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
[ removed .owner field ]
Signed-off-by: Sebastian Reichel <sre@kernel.org>
  • Loading branch information
Mike Looijmans authored and Sebastian Reichel committed Jan 22, 2015
1 parent 79969f6 commit 085bc24
Show file tree
Hide file tree
Showing 3 changed files with 556 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/power/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,14 @@ config CHARGER_TPS65090
Say Y here to enable support for battery charging with TPS65090
PMIC chips.

config BATTERY_GAUGE_LTC2941
tristate "LTC2941/LTC2943 Battery Gauge Driver"
depends on I2C
help
Say Y here to include support for LTC2941 and LTC2943 Battery
Gauge IC. The driver reports the charge count continuously, and
measures the voltage and temperature every 10 seconds.

config AB8500_BM
bool "AB8500 Battery Management Driver"
depends on AB8500_CORE && AB8500_GPADC
Expand Down
1 change: 1 addition & 0 deletions drivers/power/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ obj-$(CONFIG_BATTERY_DS2760) += ds2760_battery.o
obj-$(CONFIG_BATTERY_DS2780) += ds2780_battery.o
obj-$(CONFIG_BATTERY_DS2781) += ds2781_battery.o
obj-$(CONFIG_BATTERY_DS2782) += ds2782_battery.o
obj-$(CONFIG_BATTERY_GAUGE_LTC2941) += ltc2941-battery-gauge.o
obj-$(CONFIG_BATTERY_GOLDFISH) += goldfish_battery.o
obj-$(CONFIG_BATTERY_PMU) += pmu_battery.o
obj-$(CONFIG_BATTERY_OLPC) += olpc_battery.o
Expand Down
Loading

0 comments on commit 085bc24

Please sign in to comment.