rk30:phone:Close tps80032 vlow interrupt, only open it when in sleep mode
author张晴 <zhangqing@rock-chips.com>
Wed, 18 Jul 2012 08:56:51 +0000 (16:56 +0800)
committer张晴 <zhangqing@rock-chips.com>
Wed, 18 Jul 2012 08:56:51 +0000 (16:56 +0800)
arch/arm/mach-rk30/board-rk30-phone-twl60xx.c
drivers/mfd/twl6030-irq.c

index 913055c06c784958d842810664ec2a3b83f3c4f0..aa12cf7d701534eb205ba3f993439ed9bb52e314 100755 (executable)
@@ -74,6 +74,8 @@ int tps80032_pre_init(void){
 
        twl_reg_write(CHARGERUSB_CTRLLIMIT2,TWL6030_MODULE_CHARGER, 0x0f);
        twl_reg_write(CHARGERUSB_CTRLLIMIT2,TWL6030_MODULE_CHARGER, 0x1f);
+
+       twl_reg_write(0x05,TWL_MODULE_PM_MASTER,0x1d);   //set vlow wakeup voltage 3.45v
        
        twl_reg_write(LDO5_CFG_TRANS,TWL_MODULE_PM_RECEIVER,0x03);   //set ldo5 is disabled when in sleep mode 
        twl_reg_write(LDO7_CFG_TRANS,TWL_MODULE_PM_RECEIVER,0x03);   //set ldo7 is disabled when in sleep mode
@@ -742,13 +744,13 @@ void twl60xx_pmu_early_suspend(struct regulator_dev *rdev)
 {
        printk("%s\n", __func__);
        
-       twl_reg_write(0x06,TWL_MODULE_PIH, 0x00);
+       twl_reg_write(REG_INT_MSK_STS_A,TWL_MODULE_PIH, 0x00); //open vlow interrupt
 }
 void twl60xx_pmu_early_resume(struct regulator_dev *rdev)
 {
        printk("%s\n", __func__);
 
-       twl_reg_write(0x06,TWL_MODULE_PIH, 0x04);
+       twl_reg_write(REG_INT_MSK_STS_A,TWL_MODULE_PIH, 0x04); //close vlow interrupt
 }
 #else
 void twl60xx_pmu_early_suspend(struct regulator_dev *rdev)
index 59e2ea63e1886422b9e756cc24631690ef6cd5d7..4d306b6273d0f6aebe88ce9607d26913a739f143 100755 (executable)
@@ -557,6 +557,8 @@ int twl6030_init_irq(int irq_num, unsigned irq_base, unsigned irq_end,
        if (status < 0)
                goto fail_vlow;
 
+       twl_i2c_write_u8(TWL_MODULE_PIH, 0x04,REG_INT_MSK_STS_A);   //close vlow interrupt
+
        return status;
 
 fail_vlow: