ab8500-fg: Go to INIT_RECOVERY when charger removed
authorMartin Bergström <martin.bergstrom@stericsson.com>
Fri, 4 May 2012 12:43:50 +0000 (14:43 +0200)
committerLee Jones <lee.jones@linaro.org>
Wed, 23 Jan 2013 14:39:17 +0000 (14:39 +0000)
When the charger is removed we need to go to INIT_RECOVERY
state instead of directly to RECOVERY state.

Signed-off-by: Martin Bergstrom <martin.bergstrom@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Tested-by: Jonas ABERG <jonas.aberg@stericsson.com>
drivers/power/ab8500_fg.c

index a0cbbd393fc9e79425d48faeeb74a25f5757a95b..c791a5cef2b1a51770e7a570c7e8126bd14d8194 100644 (file)
@@ -1641,7 +1641,7 @@ static void ab8500_fg_algorithm_discharging(struct ab8500_fg *di)
 
                        if (di->recovery_needed) {
                                ab8500_fg_discharge_state_to(di,
-                                       AB8500_FG_DISCHARGE_RECOVERY);
+                                       AB8500_FG_DISCHARGE_INIT_RECOVERY);
 
                                queue_delayed_work(di->fg_wq,
                                        &di->fg_periodic_work, 0);