/* Sets the module OCP socket ENAWAKEUP bit to allow the module to send wakeups to the PRCM. Eventually this should sets PRCM wakeup registers to cause the PRCM to receive wakeup events from the module. Does not set any wakeup routing registers beyond this point - if the module is to wake up any other module or subsystem, that must be set separately. Called by omap_device code. Returns -EINVAL on error or 0 upon success.  */
int omap_hwmod_enable_wakeup(struct omap_hwmod *oh)
/* Sets the module OCP socket ENAWAKEUP bit to allow the module to send wakeups to the PRCM. Eventually this should sets PRCM wakeup registers to cause the PRCM to receive wakeup events from the module. Does not set any wakeup routing registers beyond this point - if the module is to wake up any other module or subsystem, that must be set separately. Called by omap_device code. Returns -EINVAL on error or 0 upon success.  */
int omap_hwmod_enable_wakeup(struct omap_hwmod *oh)
{
	if (!oh->sysconfig ||
	    !(oh->sysconfig->sysc_flags & SYSC_HAS_ENAWAKEUP))
		return -EINVAL;
	mutex_lock(&omap_hwmod_mutex);
	_enable_wakeup(oh);
	mutex_unlock(&omap_hwmod_mutex);
	return 0;
}