From bf846b47edcef8402b1dba602805f24aa8f120ec Mon Sep 17 00:00:00 2001 From: ubuntu Date: Mon, 28 Feb 2011 21:04:16 -0800 Subject: [PATCH] cwz update FIH --- arch/arm/mach-rk29/board-rk29-fih.c | 30 ++++++++++++++--------------- arch/arm/mach-rk29/pm.c | 7 ++++++- drivers/rtc/rtc-tps65910.c | 4 ++++ 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/arch/arm/mach-rk29/board-rk29-fih.c b/arch/arm/mach-rk29/board-rk29-fih.c index 32aded2ea6b8..fbc83597dd4d 100755 --- a/arch/arm/mach-rk29/board-rk29-fih.c +++ b/arch/arm/mach-rk29/board-rk29-fih.c @@ -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 *****************************************************************************************/ diff --git a/arch/arm/mach-rk29/pm.c b/arch/arm/mach-rk29/pm.c index de461ecfedc9..60966bde8df3 100644 --- a/arch/arm/mach-rk29/pm.c +++ b/arch/arm/mach-rk29/pm.c @@ -7,7 +7,9 @@ #include #include #include +#ifdef CONFIG_RK29_PWM_REGULATOR #include +#endif #include #include #include @@ -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(); diff --git a/drivers/rtc/rtc-tps65910.c b/drivers/rtc/rtc-tps65910.c index 4b7666d1da8b..4aacea9cc549 100644 --- a/drivers/rtc/rtc-tps65910.c +++ b/drivers/rtc/rtc-tps65910.c @@ -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) -- 2.34.1