From c4e1ccfd7d68780096334cf9b39c92d4ea9f9b1f Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=BC=A0=E6=99=B4?= Date: Thu, 25 Aug 2011 20:11:20 -0700 Subject: [PATCH] A22:set VCC 2.8V when in sleep,set key gpio pullup/down disable when in sleep --- arch/arm/mach-rk29/board-rk29-a22.c | 2 +- arch/arm/mach-rk29/spi_sram.c | 29 +++++++++++++++++++++++------ 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-rk29/board-rk29-a22.c b/arch/arm/mach-rk29/board-rk29-a22.c index 0bf00da5fdff..d86312438136 100755 --- a/arch/arm/mach-rk29/board-rk29-a22.c +++ b/arch/arm/mach-rk29/board-rk29-a22.c @@ -654,7 +654,7 @@ int wm831x_post_init(struct wm831x *parm) dcdc = regulator_get(NULL, "dcdc3"); // 1th IO regulator_set_voltage(dcdc,3000000,3000000); - regulator_set_suspend_voltage(dcdc, 3000000); + regulator_set_suspend_voltage(dcdc, 2800000); regulator_enable(dcdc); printk("%s set dcdc3=%dmV end\n", __FUNCTION__, regulator_get_voltage(dcdc)); regulator_put(dcdc); diff --git a/arch/arm/mach-rk29/spi_sram.c b/arch/arm/mach-rk29/spi_sram.c index 9cb8299f60ff..6805cd67267f 100755 --- a/arch/arm/mach-rk29/spi_sram.c +++ b/arch/arm/mach-rk29/spi_sram.c @@ -471,22 +471,31 @@ int __sramdata crumode; //static GRF_REG_SAVE __sramdata pm_grf; static void pm_keygpio_prepare(void) { - gpio6_pull = grf_readl(GRF_GPIO6_PULL); gpio2_pull = grf_readl(GRF_GPIO2_PULL); - } - void pm_keygpio_suspend(void) + void pm_keygpio_sdk_suspend(void) { grf_writel(gpio6_pull|0x7f,GRF_GPIO6_PULL);//key pullup/pulldown disable grf_writel(gpio2_pull|0x00000f30,GRF_GPIO2_PULL); } - void pm_keygpio_resume(void) + void pm_keygpio_sdk_resume(void) +{ + grf_writel(gpio6_pull,GRF_GPIO6_PULL);//key pullup/pulldown enable + grf_writel(gpio2_pull,GRF_GPIO2_PULL); +} + void pm_keygpio_a22_suspend(void) +{ + grf_writel(gpio6_pull|0x7f,GRF_GPIO6_PULL);//key pullup/pulldown disable + grf_writel(gpio2_pull|0x00000900,GRF_GPIO2_PULL); +} + void pm_keygpio_a22_resume(void) { grf_writel(gpio6_pull,GRF_GPIO6_PULL);//key pullup/pulldown enable grf_writel(gpio2_pull,GRF_GPIO2_PULL); } + static void pm_spi_gpio_prepare(void) { pm_grf.GRF_GPIO_IOMUX[1].GPIOL_IOMUX = grf_readl(GRF_GPIO1L_IOMUX); @@ -542,7 +551,11 @@ void pm_gpio_suspend(void) { pm_spi_gpio_suspend(); // spi pullup/pulldown disable.... #if defined(CONFIG_MACH_RK29_PHONESDK) - { pm_keygpio_suspend();// key pullup/pulldown disable..... + { pm_keygpio_sdk_suspend();// key pullup/pulldown disable..... + } + #endif + #if defined(CONFIG_MACH_RK29_A22) + { pm_keygpio_a22_suspend();// key pullup/pulldown disable..... } #endif } @@ -550,7 +563,11 @@ void pm_gpio_resume(void) { pm_spi_gpio_resume(); // spi pullup/pulldown enable..... #if defined(CONFIG_MACH_RK29_PHONESDK) - { pm_keygpio_resume();// key pullup/pulldown enable..... + { pm_keygpio_sdk_resume();// key pullup/pulldown enable..... + } + #endif + #if defined(CONFIG_MACH_RK29_A22) + { pm_keygpio_a22_resume();// key pullup/pulldown enable..... } #endif } -- 2.34.1