aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power/charger-manager.c
diff options
context:
space:
mode:
authorChanwoo Choi <cw00.choi@samsung.com>2014-08-26 00:41:39 -0400
committerSebastian Reichel <sre@kernel.org>2014-09-06 15:03:19 -0400
commitb1022e247872dc87a6ffd6f9aa6a92e0b67cdf00 (patch)
tree9f2763d406cdd6534ad998a8b809b0cd9e37fe57 /drivers/power/charger-manager.c
parentc6738d06a363ac7010a5c3b54e2af1957852cc45 (diff)
power: charger-manager: Check charging state right after completed initialization
This patch check the charging state after completed initialization of charger- manager and update current charging state. If charger-manager never check and update current charging state, charger-manager would have the mismatch issue between real state of cable connection and the charging state of charger-manager until first polling time of charger-manager. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: Myungjoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power/charger-manager.c')
-rw-r--r--drivers/power/charger-manager.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/power/charger-manager.c b/drivers/power/charger-manager.c
index a10fb57c209e..4e560f7212f5 100644
--- a/drivers/power/charger-manager.c
+++ b/drivers/power/charger-manager.c
@@ -1839,6 +1839,13 @@ static int charger_manager_probe(struct platform_device *pdev)
1839 device_init_wakeup(&pdev->dev, true); 1839 device_init_wakeup(&pdev->dev, true);
1840 device_set_wakeup_capable(&pdev->dev, false); 1840 device_set_wakeup_capable(&pdev->dev, false);
1841 1841
1842 /*
1843 * Charger-manager have to check the charging state right after
1844 * tialization of charger-manager and then update current charging
1845 * state.
1846 */
1847 cm_monitor();
1848
1842 schedule_work(&setup_polling); 1849 schedule_work(&setup_polling);
1843 1850
1844 return 0; 1851 return 0;