From 4ee78b7e3de96c1a4066d486ec4ecd054d77eec2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=BC=A0=E6=99=B4?= Date: Sat, 11 Aug 2012 12:13:15 +0800 Subject: [PATCH] rk30:phonepad:clear rtc status when enter sleep --- arch/arm/mach-rk30/i2c_sram.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-rk30/i2c_sram.c b/arch/arm/mach-rk30/i2c_sram.c index e871a5b0218c..21537c85d301 100755 --- a/arch/arm/mach-rk30/i2c_sram.c +++ b/arch/arm/mach-rk30/i2c_sram.c @@ -303,12 +303,15 @@ void __sramfunc rk30_suspend_voltage_set(unsigned int vol) { uint8 slaveaddr; uint16 slavereg; - uint8 data,ret; + uint8 data,ret = 0; + uint8 rtc_status_reg = 0x11; slaveaddr = I2C_SADDR; //slave device addr slavereg = 0x22; // reg addr data = 0x23; //set arm 1.0v sram_i2c_init(); //init i2c device + ret = sram_i2c_read(slaveaddr, rtc_status_reg); + sram_i2c_write(slaveaddr, rtc_status_reg, ret); arm_voltage = sram_i2c_read(slaveaddr, slavereg); // sram_printhex(ret); sram_i2c_write(slaveaddr, slavereg, data);// @@ -320,7 +323,7 @@ void __sramfunc rk30_suspend_voltage_resume(unsigned int vol) { uint8 slaveaddr; uint16 slavereg; - uint8 data,ret; + uint8 data,ret = 0; slaveaddr = I2C_SADDR; //slave device addr slavereg = 0x22; // reg addr -- 2.34.1