/* Update the slave idle mode bits in @v to be @idlemode for the @oh hwmod. Does not write to the hardware. Returns -EINVAL upon error or 0 upon success.  */
static int _set_slave_idlemode(struct omap_hwmod *oh, u8 idlemode, u32 *v)
/* Update the slave idle mode bits in @v to be @idlemode for the @oh hwmod. Does not write to the hardware. Returns -EINVAL upon error or 0 upon success.  */
static int _set_slave_idlemode(struct omap_hwmod *oh, u8 idlemode, u32 *v)
{
	if (!oh->sysconfig ||
	    !(oh->sysconfig->sysc_flags & SYSC_HAS_SIDLEMODE))
		return -EINVAL;
	*v &= ~SYSC_SIDLEMODE_MASK;
	*v |= __ffs(idlemode) << SYSC_SIDLEMODE_SHIFT;
	return 0;
}