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);
/* 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;
}
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)
#endif
+
/*****************************************************************************************
* SDMMC devices
*****************************************************************************************/
#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>
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 */
cru_writel(clksel0, CRU_CLKSEL0_CON);
printch('7');
+#ifdef CONFIG_RK29_PWM_REGULATOR
rk29_set_core_voltage(0);
+#endif
printch('6');
ddr_resume();
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)
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)