aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-omap.c
diff options
context:
space:
mode:
authorTarun Kanti DebBarma <tarun.kanti@ti.com>2012-04-27 10:13:36 -0400
committerKevin Hilman <khilman@ti.com>2012-05-11 20:08:40 -0400
commit9c4ed9e6c01e7a8bd9079da8267e1f03cb4761fc (patch)
tree095e36cbafeb166983c49df34442c4acd020ece9 /drivers/gpio/gpio-omap.c
parentb1a8e3d2d198319e40318563ff80f95605da5a0e (diff)
gpio/omap: remove suspend/resume callbacks
Both omap_gpio_suspend() and omap_gpio_resume() does programming of wakeup_en register. _gpio_rmw(base, bank->regs->wkup_en, 0xffffffff, 0); _gpio_rmw(base, bank->regs->wkup_en, bank->context.wake_en, 1); This is redundant in omap_gpio_suspend() because wakeup_en register automatically gets initialized in _set_gpio_wakeup() and set_gpio_trigger() while being called either from chip.irq_set_wake() or chip.irq_set_type(). This is also redundant in omap_gpio_resume() because wakeup_en register is programmed in omap_gpio_restore_context() called which is called from runtime resume callback. Cc: Kevin Hilman <khilman@ti.com> Cc: Tony Lindgren <tony@atomide.com> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com> Cc: Cousson, Benoit <b-cousson@ti.com> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-by: Govindraj.R <govindraj.raja@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'drivers/gpio/gpio-omap.c')
-rw-r--r--drivers/gpio/gpio-omap.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 96d2aef409b9..c89c38869c0c 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1144,50 +1144,6 @@ static int __devinit omap_gpio_probe(struct platform_device *pdev)
1144 1144
1145#ifdef CONFIG_ARCH_OMAP2PLUS 1145#ifdef CONFIG_ARCH_OMAP2PLUS
1146 1146
1147#if defined(CONFIG_PM_SLEEP)
1148static int omap_gpio_suspend(struct device *dev)
1149{
1150 struct platform_device *pdev = to_platform_device(dev);
1151 struct gpio_bank *bank = platform_get_drvdata(pdev);
1152 void __iomem *base = bank->base;
1153 unsigned long flags;
1154
1155 if (!bank->mod_usage || !bank->loses_context)
1156 return 0;
1157
1158 if (!bank->regs->wkup_en || !bank->context.wake_en)
1159 return 0;
1160
1161 spin_lock_irqsave(&bank->lock, flags);
1162 _gpio_rmw(base, bank->regs->wkup_en, 0xffffffff, 0);
1163 _gpio_rmw(base, bank->regs->wkup_en, bank->context.wake_en, 1);
1164 spin_unlock_irqrestore(&bank->lock, flags);
1165
1166 return 0;
1167}
1168
1169static int omap_gpio_resume(struct device *dev)
1170{
1171 struct platform_device *pdev = to_platform_device(dev);
1172 struct gpio_bank *bank = platform_get_drvdata(pdev);
1173 void __iomem *base = bank->base;
1174 unsigned long flags;
1175
1176 if (!bank->mod_usage || !bank->loses_context)
1177 return 0;
1178
1179 if (!bank->regs->wkup_en || !bank->context.wake_en)
1180 return 0;
1181
1182 spin_lock_irqsave(&bank->lock, flags);
1183 _gpio_rmw(base, bank->regs->wkup_en, 0xffffffff, 0);
1184 _gpio_rmw(base, bank->regs->wkup_en, bank->context.wake_en, 1);
1185 spin_unlock_irqrestore(&bank->lock, flags);
1186
1187 return 0;
1188}
1189#endif /* CONFIG_PM_SLEEP */
1190
1191#if defined(CONFIG_PM_RUNTIME) 1147#if defined(CONFIG_PM_RUNTIME)
1192static void omap_gpio_restore_context(struct gpio_bank *bank); 1148static void omap_gpio_restore_context(struct gpio_bank *bank);
1193 1149
@@ -1416,14 +1372,11 @@ static void omap_gpio_restore_context(struct gpio_bank *bank)
1416} 1372}
1417#endif /* CONFIG_PM_RUNTIME */ 1373#endif /* CONFIG_PM_RUNTIME */
1418#else 1374#else
1419#define omap_gpio_suspend NULL
1420#define omap_gpio_resume NULL
1421#define omap_gpio_runtime_suspend NULL 1375#define omap_gpio_runtime_suspend NULL
1422#define omap_gpio_runtime_resume NULL 1376#define omap_gpio_runtime_resume NULL
1423#endif 1377#endif
1424 1378
1425static const struct dev_pm_ops gpio_pm_ops = { 1379static const struct dev_pm_ops gpio_pm_ops = {
1426 SET_SYSTEM_SLEEP_PM_OPS(omap_gpio_suspend, omap_gpio_resume)
1427 SET_RUNTIME_PM_OPS(omap_gpio_runtime_suspend, omap_gpio_runtime_resume, 1380 SET_RUNTIME_PM_OPS(omap_gpio_runtime_suspend, omap_gpio_runtime_resume,
1428 NULL) 1381 NULL)
1429}; 1382};