/* Update the master standby mode bits in @v to be @standbymode for the @oh hwmod. Does not write to the hardware. Returns -EINVAL upon error or 0 upon success.  */
static int _set_master_standbymode(struct omap_hwmod *oh, u8 standbymode, u32 *v)
/* Update the master standby mode bits in @v to be @standbymode for the @oh hwmod. Does not write to the hardware. Returns -EINVAL upon error or 0 upon success.  */
static int _set_master_standbymode(struct omap_hwmod *oh, u8 standbymode, u32 *v)
{
	if (!oh->sysconfig ||
	    !(oh->sysconfig->sysc_flags & SYSC_HAS_MIDLEMODE))
		return -EINVAL;
	*v &= ~SYSC_MIDLEMODE_MASK;
	*v |= __ffs(standbymode) << SYSC_MIDLEMODE_SHIFT;
	return 0;
}