charger-manager: Support limit of maximum possible
authorChanwoo Choi <cw00.choi@samsung.com>
Fri, 21 Sep 2012 04:20:05 +0000 (21:20 -0700)
committerAnton Vorontsov <anton.vorontsov@linaro.org>
Fri, 21 Sep 2012 05:08:00 +0000 (22:08 -0700)
commit8fcfe088e21aa0db9d62eaf565757def673efba6
tree5394f0f8ac6ec50f1ab158927c858a621b074127
parent2ed9e9b6530951b5b96185e6761119361a166d7a
charger-manager: Support limit of maximum possible

This patch check maximum possible duration of charging/discharging.

If whole charging duration exceed 'desc->charging_max_duration_ms', cm
stop charging to prevent overcharge/overheat. And if discharging duration
exceed, charger cable is attached, after full-batt, cm start charging to
maintain fully charged state for battery.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
drivers/power/charger-manager.c
include/linux/power/charger-manager.h