mfd: ab8500-sysctrl.c: Provide charging as reset reason
authorJonas Aaberg <jonas.aberg@stericsson.com>
Thu, 18 Aug 2011 08:14:38 +0000 (10:14 +0200)
committerLee Jones <lee.jones@linaro.org>
Mon, 4 Feb 2013 08:28:45 +0000 (08:28 +0000)
It's possible to supply a string to provide a reason for
triggering a restart. In this case our reason is to enter
charging-only mode, as a charger was found to be present.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-by: Karl KOMIEROWSKI <karl.komierowski@stericsson.com>
drivers/mfd/ab8500-sysctrl.c

index 405ca68..3aaff60 100644 (file)
@@ -59,7 +59,7 @@ void ab8500_power_off(void)
                               "Charger \"%s\" is connected with known battery."
                               " Rebooting.\n",
                               pss[i]);
-                       machine_restart(NULL);
+                       machine_restart("charging");
                }
        }