diff options
author | Avinash.H.M <avinashhm@ti.com> | 2011-05-02 21:04:55 +0530 |
---|---|---|
committer | Nishanth Menon <nm@ti.com> | 2011-06-13 16:37:14 -0500 |
commit | 836f6a62ad58f7974de7ab4c7a13a73d499afadf (patch) | |
tree | 4d3a07164766dbcb0aad531ebd6ba51e966f0a51 /drivers/gpio | |
parent | 32ba83a168aa0965ecde5988d4eef94880287ffa (diff) | |
download | kernel_samsung_tuna-836f6a62ad58f7974de7ab4c7a13a73d499afadf.zip kernel_samsung_tuna-836f6a62ad58f7974de7ab4c7a13a73d499afadf.tar.gz kernel_samsung_tuna-836f6a62ad58f7974de7ab4c7a13a73d499afadf.tar.bz2 |
omap4: enable, disable GPIO device
Enable and disable the GPIO device in the resume and prepare idle hooks for
GPIO. Without this clocks won't be disabled and it won't transition to
lowpower.
Signed-off-by: Avinash.H.M <avinashhm@ti.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-omap.c | 10 |
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); |