diff options
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 3 | ||||
-rw-r--r-- | drivers/gpio/gpio-omap.c | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 29eb157..6ceb829 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c @@ -1838,7 +1838,8 @@ static struct omap_hwmod_opt_clk gpio2_opt_clks[] = { static struct omap_hwmod omap44xx_gpio2_hwmod = { .name = "gpio2", .class = &omap44xx_gpio_hwmod_class, - .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, + .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET | + HWMOD_SWSUP_SIDLE , .mpu_irqs = omap44xx_gpio2_irqs, .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio2_irqs), .main_clk = "gpio2_ick", diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 01f74a8..13ca564 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -73,6 +73,8 @@ struct omap3_gpio_regs { static struct omap3_gpio_regs gpio_context[OMAP34XX_NR_GPIOS]; #endif +#include <plat/omap_device.h> + /* * TODO: Cleanup gpio_bank usage as it is having information * related to all instances of the device @@ -1748,6 +1750,7 @@ void omap2_gpio_prepare_for_idle(int off_mode) { int i, c = 0; int min = 0; + struct platform_device *pdev; if (cpu_is_omap34xx()) min = 1; @@ -1760,6 +1763,9 @@ void omap2_gpio_prepare_for_idle(int off_mode) for (j = 0; j < hweight_long(bank->dbck_enable_mask); j++) clk_disable(bank->dbck); + pdev = to_platform_device(bank->dev); + omap_device_idle(pdev); + if (!off_mode) continue; @@ -1817,6 +1823,7 @@ void omap2_gpio_resume_after_idle(void) { int i; int min = 0; + struct platform_device *pdev; if (cpu_is_omap34xx()) min = 1; @@ -1825,6 +1832,9 @@ void omap2_gpio_resume_after_idle(void) u32 l = 0, gen, gen0, gen1; int j; + pdev = to_platform_device(bank->dev); + omap_device_enable(pdev); + for (j = 0; j < hweight_long(bank->dbck_enable_mask); j++) clk_enable(bank->dbck); |