/* Return the powerdomain pwrdm's previous power state. Returns -EINVAL if the powerdomain pointer is null or returns the previous power state upon success.  */
int pwrdm_read_prev_pwrst(struct powerdomain *pwrdm)
/* Return the powerdomain pwrdm's previous power state. Returns -EINVAL if the powerdomain pointer is null or returns the previous power state upon success.  */
int pwrdm_read_prev_pwrst(struct powerdomain *pwrdm)
{
	if (!pwrdm)
		return -EINVAL;
	return prm_read_mod_bits_shift(pwrdm->prcm_offs, OMAP3430_PM_PREPWSTST,
					OMAP3430_LASTPOWERSTATEENTERED_MASK);
}