aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-omap.c10
1 files changed, 10 insertions, 0 deletions
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);