Thread (5 messages) 5 messages, 4 authors, 2011-03-09

[PATCH 2/7] OMAP2+: mux: Enable wakeup for wakeup enable requested pads

From: Kevin Hilman <hidden>
Date: 2011-03-05 01:57:55
Also in: linux-omap, linux-serial

Possibly related (same subject, not in this thread)

Kevin Hilman [off-list ref] writes:
"Govindraj.R" [off-list ref] writes:
[...]
quoted
 /* Assumes the calling function takes care of locking */
 void omap_hwmod_mux(struct omap_hwmod_mux_info *hmux, u8 state)
 {
@@ -342,6 +365,9 @@ void omap_hwmod_mux(struct omap_hwmod_mux_info *hmux, u8 state)
 				break;
 			flags &= ~OMAP_DEVICE_PAD_ENABLED;
 			val = pad->idle;
+			if (flags & OMAP_DEVICE_PAD_WAKEUP)
+				val |= OMAP_WAKEUP_EN;
+
Is this needed on every idle transition?  

You're currently setting it on every idle transition, but never clearing
it.  If it is to be a one-time thing, then move it to the early init of
the mux.
Just to clarify...

So as soon as the hwmod is first idled, IO-ring wakeups are enabled for
any pads that have OMAP_DEVICE_PAD_WAKEUP.

The problem here (compared with behavior of existing code) is that there 
is no provision for disabling IO-ring wakeups.

For example, with current code, you can disable wakeups from userspace
using the sysfs control file /sys/devices/.../power/wakeup, whose value
can be checked using device_may_wakeup(), like current
mach-omap2/serial.c code does.  

With this patch, IO-ring wakeups are always enabled, and never disabled.

Kevin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help