/* Return the clockdomain's current state transition mode from the corresponding domain CM_CLKSTCTRL register. Returns -EINVAL if clk is NULL or the current mode upon success.  */
static int omap2_clkdm_clktrctrl_read(struct clockdomain *clkdm)
/* Return the clockdomain's current state transition mode from the corresponding domain CM_CLKSTCTRL register. Returns -EINVAL if clk is NULL or the current mode upon success.  */
static int omap2_clkdm_clktrctrl_read(struct clockdomain *clkdm)
{
	u32 v;
	if (!clkdm)
		return -EINVAL;
	v = cm_read_mod_reg(clkdm->pwrdm.ptr->prcm_offs, CM_CLKSTCTRL);
	v &= clkdm->clktrctrl_mask;
	v >>= __ffs(clkdm->clktrctrl_mask);
	return v;
}