From 3ee7d757593f7322ccf0b1b52698e81bc2fa64b5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=BC=A0=E6=99=B4?= Date: Tue, 15 Apr 2014 09:18:46 +0800 Subject: [PATCH] rk3288:rk808:slove rk808 auto power on when power off --- drivers/mfd/rk808.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c index b3547f8f7a5c..4a1551e7e428 100755 --- a/drivers/mfd/rk808.c +++ b/drivers/mfd/rk808.c @@ -1120,7 +1120,9 @@ static int rk808_device_shutdown(void) struct rk808 *rk808 = g_rk808; printk("%s\n",__func__); - + + ret = rk808_set_bits(rk808, RK808_INT_STS_MSK_REG1,(0x3<<5),(0x3<<5)); //close rtc int when power off + ret = rk808_clear_bits(rk808, RK808_RTC_INT_REG,(0x3<<2)); //close rtc int when power off ret = rk808_reg_read(rk808,RK808_DEVCTRL_REG); ret = rk808_set_bits(rk808, RK808_DEVCTRL_REG,(0x1<<3),(0x1<<3)); // ret = rk808_set_bits(rk808, RK808_DEVCTRL_REG,(0x1<<4),(0x1<<4)); @@ -1295,6 +1297,9 @@ static int rk808_pre_init(struct rk808 *rk808) return ret; } /**********************************/ + ret = rk808_clear_bits(rk808, RK808_INT_STS_MSK_REG1,(0x3<<5)); //open rtc int when power on + ret = rk808_set_bits(rk808, RK808_RTC_INT_REG,(0x1<<3),(0x1<<3)); //open rtc int when power on + return 0; } -- 2.34.1