[PATCH 13/11] OMAP2+: GPIO: ensure bank wakeups are enabled by default

2010-12-09 Thread Kevin Hilman
As part of the GPIO conversion to platform_device/platform_driver,
commit 2fae7fbed072705d91e09ed393b2e580b2d895fc (OMAP: GPIO: prepare
for platform driver) removed hard-coded per-bank SYSCONFIG register
values in favor of using omap_hwmod to manage the SYSCONFIG register.

In the previous code, bank-level wakeups were enabled by default using
the SYSCONFIG.ENAWAKEUP bit, but omap_hwmod does not enable wakeups by
default.  Thus the above commit effectively disabled GPIO bank wakeups.

This patch enables GPIO bank level wakeups by default to preserve
previous functionality.

Longer term, per-bank wakeup functionality should be controlled by the
driver and enabled only when there are wakeup-enabled GPIOs in the
bank.

Tested on 36xx/Zoom3 where serial console (QUART) uses GPIO IRQ.

Signed-off-by: Kevin Hilman khil...@deeprootsystems.com
---
Applies to Tony's devel-gpio branch.

 arch/arm/mach-omap2/gpio.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c
index 413de18..05a123f 100644
--- a/arch/arm/mach-omap2/gpio.c
+++ b/arch/arm/mach-omap2/gpio.c
@@ -75,6 +75,7 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void 
*unused)
return -EINVAL;
}
 
+   omap_hwmod_enable_wakeup(oh);
od = omap_device_build(name, id - 1, oh, pdata,
sizeof(*pdata), omap_gpio_latency,
ARRAY_SIZE(omap_gpio_latency),
-- 
1.7.2.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 13/11] OMAP2+: GPIO: ensure bank wakeups are enabled by default

2010-12-09 Thread Tony Lindgren
* Kevin Hilman khil...@deeprootsystems.com [101209 11:33]:
 As part of the GPIO conversion to platform_device/platform_driver,
 commit 2fae7fbed072705d91e09ed393b2e580b2d895fc (OMAP: GPIO: prepare
 for platform driver) removed hard-coded per-bank SYSCONFIG register
 values in favor of using omap_hwmod to manage the SYSCONFIG register.
 
 In the previous code, bank-level wakeups were enabled by default using
 the SYSCONFIG.ENAWAKEUP bit, but omap_hwmod does not enable wakeups by
 default.  Thus the above commit effectively disabled GPIO bank wakeups.
 
 This patch enables GPIO bank level wakeups by default to preserve
 previous functionality.

So this patch is no longer needed, right?

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 13/11] OMAP2+: GPIO: ensure bank wakeups are enabled by default

2010-12-09 Thread Kevin Hilman
Tony Lindgren t...@atomide.com writes:

 * Kevin Hilman khil...@deeprootsystems.com [101209 11:33]:
 As part of the GPIO conversion to platform_device/platform_driver,
 commit 2fae7fbed072705d91e09ed393b2e580b2d895fc (OMAP: GPIO: prepare
 for platform driver) removed hard-coded per-bank SYSCONFIG register
 values in favor of using omap_hwmod to manage the SYSCONFIG register.
 
 In the previous code, bank-level wakeups were enabled by default using
 the SYSCONFIG.ENAWAKEUP bit, but omap_hwmod does not enable wakeups by
 default.  Thus the above commit effectively disabled GPIO bank wakeups.
 
 This patch enables GPIO bank level wakeups by default to preserve
 previous functionality.

 So this patch is no longer needed, right?

Yup, you beat me to it.

This is actually a problem in the omap_hwmod core, and I posted a
separate patch[1] to fix that problem.

Kevin

[1] http://marc.info/?l=linux-omapm=129193625420446w=2
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html