diff options
author | Tarun Kanti DebBarma <tarun.kanti@ti.com> | 2011-09-29 04:47:25 +0530 |
---|---|---|
committer | Tarun Kanti DebBarma <tarun.kanti@ti.com> | 2012-02-06 14:13:40 +0530 |
commit | 60a3437dc9a61c7f4b199c2bac3dcc7b611b1178 (patch) | |
tree | c115df789b5da33b843ee7dddf34ddf58e2ae49d /arch/arm/plat-omap/include/plat/gpio.h | |
parent | 6d62e216b2ccbb8176dca73b6899b12a417bb22d (diff) |
gpio/omap: handle save/restore context in GPIO driver
Modify omap_gpio_prepare_for_idle() & omap_gpio_resume_after_idle() functions
to handle save context & restore context respectively in the OMAP GPIO driver
itself instead of calling these functions from pm specific files.
For this, in gpio_prepare_for_idle(), call *_get_context_loss_count() and in
gpio_resume_after_idle() call it again. If the count is different, do restore
context.
Signed-off-by: Charulatha V <charu@ti.com>
Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/plat-omap/include/plat/gpio.h')
-rw-r--r-- | arch/arm/plat-omap/include/plat/gpio.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/plat-omap/include/plat/gpio.h b/arch/arm/plat-omap/include/plat/gpio.h index 6eb035c0cc1..c1ddc5a3de2 100644 --- a/arch/arm/plat-omap/include/plat/gpio.h +++ b/arch/arm/plat-omap/include/plat/gpio.h @@ -201,14 +201,15 @@ struct omap_gpio_platform_data { bool loses_context; /* whether the bank would ever lose context */ struct omap_gpio_reg_offs *regs; + + /* Return context loss count due to PM states changing */ + int (*get_context_loss_count)(struct device *dev); }; extern void omap2_gpio_prepare_for_idle(int off_mode); extern void omap2_gpio_resume_after_idle(void); extern void omap_set_gpio_debounce(int gpio, int enable); extern void omap_set_gpio_debounce_time(int gpio, int enable); -extern void omap_gpio_save_context(void); -extern void omap_gpio_restore_context(void); /*-------------------------------------------------------------------------*/ /* Wrappers for "new style" GPIO calls, using the new infrastructure |