cwz update FIH
authorubuntu <superboy@ubuntu.(none)>
Tue, 1 Mar 2011 05:04:16 +0000 (21:04 -0800)
committerubuntu <superboy@ubuntu.(none)>
Tue, 1 Mar 2011 05:04:16 +0000 (21:04 -0800)
arch/arm/mach-rk29/board-rk29-fih.c
arch/arm/mach-rk29/pm.c
drivers/rtc/rtc-tps65910.c

index 32aded2ea6b8eac87598f5b1db5cbc4afbbbc299..fbc83597dd4de387e19b726d49b4de06c0a7b590 100755 (executable)
@@ -647,9 +647,9 @@ static int rk29_tps65910_config(struct tps65910_platform_data *pdata)
        if (err) {
                printk(KERN_ERR "Unable to read TPS65910_REG_DEVCTRL2 reg\n");
                return -EIO;
-       }
-       /* Set sleep state active high */
-       val |= (TPS65910_DEV2_SLEEPSIG_POL);
+       }       
+       /* Set sleep state active high and allow device turn-off after PWRON long press */
+       val |= (TPS65910_DEV2_SLEEPSIG_POL | TPS65910_DEV2_PWON_LP_OFF);
 
        err = tps65910_i2c_write_u8(TPS65910_I2C_ID0, val,
                        TPS65910_REG_DEVCTRL2);
@@ -718,11 +718,10 @@ static int rk29_tps65910_config(struct tps65910_platform_data *pdata)
        /* Set RTC Power, disable Smart Reflex in DEVCTRL_REG */
        val = 0;
        val |= (TPS65910_SR_CTL_I2C_SEL);
-
        err = tps65910_i2c_write_u8(TPS65910_I2C_ID0, val,
                        TPS65910_REG_DEVCTRL);
        if (err) {
-               printk(KERN_ERR "Unabale to write TPS65910_REG_DEVCTRL reg\n");
+               printk(KERN_ERR "Unable to write TPS65910_REG_DEVCTRL reg\n");
                return -EIO;
        }
 
@@ -921,20 +920,20 @@ static struct i2c_board_info __initdata board_i2c1_devices[] = {
 static struct i2c_board_info __initdata board_i2c2_devices[] = {
 #if defined (CONFIG_HANNSTAR_P1003)
     {
-      .type           = "p1003_touch",
-      .addr           = 0x04,
-      .flags          = 0,
-      .irq            = RK29_PIN0_PA2,
-      .platform_data  = &p1003_info,
+        .type           = "p1003_touch",
+        .addr           = 0x04,
+        .flags          = 0,
+        .irq            = RK29_PIN0_PA2,
+        .platform_data  = &p1003_info,
     },
 #endif
 #if defined (CONFIG_EETI_EGALAX)
     {
-      .type           = "egalax_i2c",
-      .addr           = 0x04,
-      .flags          = 0,
-      .irq            = RK29_PIN0_PA2,
-      .platform_data  = &eeti_egalax_info,
+        .type           = "egalax_i2c",
+        .addr           = 0x04,
+        .flags          = 0,
+        .irq            = RK29_PIN0_PA2,
+        .platform_data  = &eeti_egalax_info,
     },
 #endif
 #if defined (CONFIG_TPS65910_CORE)
@@ -1454,6 +1453,7 @@ static struct platform_device rk29_device_pwm_regulator = {
 
 #endif
 
+
 /*****************************************************************************************
  * SDMMC devices
 *****************************************************************************************/
index de461ecfedc91a26e80e945be0c110bf002e9f2e..60966bde8df33601d71cc67922d08a9f3981ff29 100644 (file)
@@ -7,7 +7,9 @@
 #include <linux/init.h>
 #include <linux/pm.h>
 #include <linux/suspend.h>
+#ifdef CONFIG_RK29_PWM_REGULATOR
 #include <linux/regulator/rk29-pwm-regulator.h>
+#endif
 #include <linux/io.h>
 #include <linux/wakelock.h>
 #include <asm/tlbflush.h>
@@ -138,8 +140,9 @@ static void __sramfunc rk29_sram_suspend(void)
        ddr_suspend();
 
        printch('6');
+#ifdef CONFIG_RK29_PWM_REGULATOR
        rk29_set_core_voltage(1000000);
-
+#endif
        printch('7');
        clksel0 = cru_readl(CRU_CLKSEL0_CON);
        /* set arm clk 24MHz/32 = 750KHz */
@@ -151,7 +154,9 @@ static void __sramfunc rk29_sram_suspend(void)
        cru_writel(clksel0, CRU_CLKSEL0_CON);
        printch('7');
 
+#ifdef CONFIG_RK29_PWM_REGULATOR
        rk29_set_core_voltage(0);
+#endif
        printch('6');
 
        ddr_resume();
index 4b7666d1da8be7779613a8b8ce93a7710e3aaef7..4aacea9cc549ddee2e3733ddaf501e530c804b9d 100644 (file)
@@ -556,8 +556,10 @@ static int __devinit tps65910_rtc_probe(struct platform_device *pdev)
        if (rd_reg & BIT_RTC_STATUS_REG_POWER_UP_M) {
                dev_warn(&pdev->dev, "Power up reset detected.\n");
                //      cwz:if rtc power up reset, set default time.
+#if 1
                printk(KERN_INFO "TPS65910 RTC set to default time\n");
                tps65910_rtc_set_time(rtc, &tm_def);
+#endif
        }
        
        if (rd_reg & BIT_RTC_STATUS_REG_ALARM_M)
@@ -592,8 +594,10 @@ static int __devinit tps65910_rtc_probe(struct platform_device *pdev)
        if (!(rd_reg & BIT_RTC_CTRL_REG_STOP_RTC_M)) {          
                dev_info(&pdev->dev, "Enabling TPS65910-RTC.\n");
                //      cwz:if rtc stop, set default time, then enable rtc
+#if 1
                printk(KERN_INFO "TPS65910 RTC set to default time\n");
                tps65910_rtc_set_time(rtc, &tm_def);
+#endif
                rd_reg |= BIT_RTC_CTRL_REG_STOP_RTC_M;
                ret = tps65910_rtc_write_u8(rd_reg, TPS65910_REG_RTC_CTRL);
                if (ret < 0)