<div class="gmail_quote">On Fri, May 6, 2011 at 3:09 AM, Govindraj.R <span dir="ltr"><<a href="mailto:govindraj.raja@ti.com">govindraj.raja@ti.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
...<br>
+<br>
+/**<br>
+ * omap_hwmod_enable_ioring_wakeup - Set wakeup bit for iopad ring.<br>
+ * @oh: struct omap_hwmod *<br>
+ * @enable: based on 0 or 1 set or unset wakeup bit.<br>
+ *<br>
+ * Traverse through dynamic pads, if pad is enabled then<br>
+ * set wakeup enable bit flag for the mux pin. Wakeup pad bit<br>
+ * will be set during hwmod idle transistion.<br>
+ * Return error if pads are not enabled or not available.<br>
+ */<br>
+int omap_hwmod_enable_ioring_wakeup(struct omap_hwmod *oh, bool enable)<br>
+{<br>
+ struct omap_device_pad *pad;<br>
+ int ret = -EINVAL, j;<br>
+ int val = 0;<br>
+<br>
+ /* Enable pin mux to make pad wake-up capable */<br>
+ if (enable)<br>
+ val = OMAP_WAKEUP_EN;<br>
+ else<br>
+ val = ~OMAP_WAKEUP_EN;<br>
+<br>
+ if (oh->mux->enabled) {<br>
+ for (j = 0; j < oh->mux->nr_pads_dynamic; j++) {<br>
+ pad = oh->mux->pads_dynamic[j];<br>
+ if (pad->flags & OMAP_DEVICE_PAD_WAKEUP) {<br>
+ pad->idle = pad->enable | val;<br></blockquote><div><br></div><div>I haven't gone to find the patch uses the pad->idle value (or the TRM docs), but the !enable case that OR's in every bit except for OMAP_WAKEUP_EN seems strange, should the non-wakeup-enabled idle value for the pad set all other bits in that reg?</div>
<div><br></div><div>..</div><div><br></div><div>Todd</div><div> </div></div>