]> nv-tegra.nvidia Code Review - linux-3.10.git/commit
power: Add early battery capacity and voltage snapshot recording
authordarbha sriharsha <dsriharsha@nvidia.com>
Tue, 24 Dec 2013 11:40:19 +0000 (17:10 +0530)
committerDarbha Sriharsha <dsriharsha@nvidia.com>
Mon, 6 Jan 2014 09:57:48 +0000 (01:57 -0800)
commit20f4d5f22b0ac14740ea57522646b67d67c5aa8a
tree2e6a1c72fd9e99d4cd22a61c8d831236d8240127
parent323d913ad65d09ec90196aaa22b71561167a37a3
power: Add early battery capacity and voltage snapshot recording

If the battery gauge gets incorrect readings for capacity as 0
even for an instant soon after the kernel bootup, the board will
incorrectly shut down reporting low battery though there is
sufficient juice in the battery. Hence, if there is even a slight
delay in correct battery capacity reporting by fuel gauge due to chip
problem or coding error, this can lead to the board incorrectly
shutting down as for an instant, the android framework will read the
capacity as 0. Hence, adding support for recording an early snapshot
value of capacity and voltage values and making these early snapshots
available through sysfs entries, so that appropriate sanity tests
can examine these values and flag an error if early capacity snapshot
value is 0.

Bug 1291416

Change-Id: I1be86b23bdc247d7c1bfd8230e433345e026cba8
Signed-off-by: darbha sriharsha <dsriharsha@nvidia.com>
Reviewed-on: http://git-master/r/349431
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
drivers/power/bq27441_battery.c
drivers/power/max17042_battery.c
drivers/power/max17048_battery.c
drivers/power/sbs-battery.c