]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
power: charger-manager: Check charging state right after completed initialization
authorChanwoo Choi <cw00.choi@samsung.com>
Tue, 26 Aug 2014 04:41:39 +0000 (13:41 +0900)
committerSebastian Reichel <sre@kernel.org>
Sat, 6 Sep 2014 19:03:19 +0000 (21:03 +0200)
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>
drivers/power/charger-manager.c

index a10fb57c209e007f8cc827e415e95be8916a9341..4e560f7212f5d802817e26eaec5864683ce15856 100644 (file)
@@ -1839,6 +1839,13 @@ static int charger_manager_probe(struct platform_device *pdev)
        device_init_wakeup(&pdev->dev, true);
        device_set_wakeup_capable(&pdev->dev, false);
 
+       /*
+        * Charger-manager have to check the charging state right after
+        * tialization of charger-manager and then update current charging
+        * state.
+        */
+       cm_monitor();
+
        schedule_work(&setup_polling);
 
        return 0;