From 7ab463de1ea6ee0d6a3128709108f94bdecd9c7a Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=BC=A0=E6=99=B4?= Date: Wed, 1 Aug 2012 17:41:38 +0800 Subject: [PATCH] rk30:modify suspend func for 8326 and tps65910 --- arch/arm/mach-rk30/board-rk30-phonepad.c | 15 +++++++++++---- arch/arm/mach-rk30/board-rk30-sdk.c | 16 +++++++++++----- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-rk30/board-rk30-phonepad.c b/arch/arm/mach-rk30/board-rk30-phonepad.c index 7680d9e6576d..9ef6f09f2ad1 100755 --- a/arch/arm/mach-rk30/board-rk30-phonepad.c +++ b/arch/arm/mach-rk30/board-rk30-phonepad.c @@ -1835,19 +1835,26 @@ static struct i2c_board_info __initdata i2c1_info[] = { void __sramfunc board_pmu_suspend(void) { + #if defined (CONFIG_MFD_WM831X_I2C) if(g_pmic_type == PMIC_TYPE_WM8326) board_pmu_wm8326_suspend(); - else if(g_pmic_type == PMIC_TYPE_TPS65910) + #endif + #if defined (CONFIG_MFD_TPS65910) + if(g_pmic_type == PMIC_TYPE_TPS65910) board_pmu_tps65910_suspend(); - + #endif } void __sramfunc board_pmu_resume(void) { + #if defined (CONFIG_MFD_WM831X_I2C) if(g_pmic_type == PMIC_TYPE_WM8326) board_pmu_wm8326_resume(); - else if(g_pmic_type == PMIC_TYPE_TPS65910) - board_pmu_tps65910_resume(); + #endif + #if defined (CONFIG_MFD_TPS65910) + if(g_pmic_type == PMIC_TYPE_TPS65910) + board_pmu_tps65910_resume(); + #endif } diff --git a/arch/arm/mach-rk30/board-rk30-sdk.c b/arch/arm/mach-rk30/board-rk30-sdk.c index 1eaec78a1308..4865314c883f 100755 --- a/arch/arm/mach-rk30/board-rk30-sdk.c +++ b/arch/arm/mach-rk30/board-rk30-sdk.c @@ -1572,22 +1572,28 @@ static struct i2c_board_info __initdata i2c1_info[] = { }; #endif - void __sramfunc board_pmu_suspend(void) { + #if defined (CONFIG_MFD_WM831X_I2C) if(g_pmic_type == PMIC_TYPE_WM8326) board_pmu_wm8326_suspend(); - else if(g_pmic_type == PMIC_TYPE_TPS65910) + #endif + #if defined (CONFIG_MFD_TPS65910) + if(g_pmic_type == PMIC_TYPE_TPS65910) board_pmu_tps65910_suspend(); - + #endif } void __sramfunc board_pmu_resume(void) { + #if defined (CONFIG_MFD_WM831X_I2C) if(g_pmic_type == PMIC_TYPE_WM8326) board_pmu_wm8326_resume(); - else if(g_pmic_type == PMIC_TYPE_TPS65910) - board_pmu_tps65910_resume(); + #endif + #if defined (CONFIG_MFD_TPS65910) + if(g_pmic_type == PMIC_TYPE_TPS65910) + board_pmu_tps65910_resume(); + #endif } #ifdef CONFIG_I2C2_RK30 -- 2.34.1