From 7cf7fc9784d0bf3fcd3dc9befbe1f559d49a188a Mon Sep 17 00:00:00 2001 From: xkd Date: Tue, 22 Jan 2013 17:33:22 +0800 Subject: [PATCH] reboot system if power off with dc charger pluged in --- arch/arm/mach-rk30/board-rk3168-ds1006h.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/mach-rk30/board-rk3168-ds1006h.c b/arch/arm/mach-rk30/board-rk3168-ds1006h.c index b0bd99b7d3ba..9e59c1b17d53 100755 --- a/arch/arm/mach-rk30/board-rk3168-ds1006h.c +++ b/arch/arm/mach-rk30/board-rk3168-ds1006h.c @@ -1638,6 +1638,17 @@ static void rk30_pm_power_off(void) #if defined(CONFIG_MFD_WM831X) wm831x_set_bits(Wm831x,WM831X_GPIO_LEVEL,0x0001,0x0000); //set sys_pwr 0 wm831x_device_shutdown(Wm831x);//wm8326 shutdown +#endif +#if defined(CONFIG_REGULATOR_ACT8846) + if (pmic_is_act8846()) { + printk("enter dcdet===========\n"); + if(gpio_get_value (RK30_PIN0_PB2) == GPIO_LOW) + { + printk("enter restart===========\n"); + arm_pm_restart(0, NULL); + } + //act8931_device_shutdown(); + } #endif while (1); } -- 2.34.1