power: max17042: battery depletion EDP client
authorSivaram Nair <sivaramn@nvidia.com>
Wed, 31 Oct 2012 12:22:13 +0000 (14:22 +0200)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 19:43:20 +0000 (12:43 -0700)
commit08b33eecdb2b3d91e7cff3ed9fe87dde7bca53f0
treecbad075b16f64ac1c103415aafa4e042291b0ebd
parent8608c156af9a94be52c3dbeafd958b200a9e5aaf
power: max17042: battery depletion EDP client

As the battery in a phone depletes, its internal resistance increases
and its open-circuit voltage decreases. So, a battery discharge that
might be safe when the battery is full might cause an under-voltage
failure when the battery is significantly depleted.

This patch creates a battery-depletion EDP client with an E0 current
that equals the delta between peak discharge current with a fully
charged battery and peak discharge current with a 95% depleted battery.

The battery state is determined by periodically polling the fuel gauge
registers and determining the depletion.

Bug 1049930

Change-Id: I133c78b5aa655fb7da05cc159eccfc9b42a76799
Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
Reviewed-on: http://git-master/r/160196
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
arch/arm/mach-tegra/board-pluto-sensors.c
drivers/power/max17042_battery.c
include/linux/power/max17042_battery.h