lib/sw_apps/zynqmp_pmufw/src/pm_slave.c
static void PmSlaveClearAfterState(PmSlave* const slv, const PmStateId prev)
{
	const PmStateId curr = slv->node.currState;

	/* Check if slave doesn't use clocks in the new state */
	if (NULL != slv->node.clocks) {
		if ((0U != (slv->slvFsm->states[prev] & PM_CAP_CLOCK)) &&
		    (0U == (slv->slvFsm->states[curr] & PM_CAP_CLOCK))) {
			PmClockRelease(&slv->node);
		}
	}

	/* Check if slave doesn't need power in the new state */
	if (NULL != slv->node.parent) {
		if ((0U != (slv->slvFsm->states[prev] & PM_CAP_POWER)) &&
		    (0U == (slv->slvFsm->states[curr] & PM_CAP_POWER))) {
			PmPowerReleaseParent(&slv->node);
		}
	}

}
/**
 * PmSlaveClearAfterState() - Clean after exiting a state
 * @slv		Slave that exited the prev state
 * @prev	Previous state the slave was in
 */
Clean after exiting a state
@slv         Slave that exited the prev state
@prev        Previous state the slave was in
Clean after exiting a state @slv Slave that exited the prev state @prev Previous state the slave was in
static void PmSlaveClearAfterState(PmSlave* const slv, const PmStateId prev)
{
	const PmStateId curr = slv->node.currState;
	if (NULL != slv->node.clocks) {
		if ((0U != (slv->slvFsm->states[prev] & PM_CAP_CLOCK)) &&
		    (0U == (slv->slvFsm->states[curr] & PM_CAP_CLOCK))) {
			PmClockRelease(&slv->node);
		}
	}
	if (NULL != slv->node.parent) {
		if ((0U != (slv->slvFsm->states[prev] & PM_CAP_POWER)) &&
		    (0U == (slv->slvFsm->states[curr] & PM_CAP_POWER))) {
			PmPowerReleaseParent(&slv->node);
		}
	}
}
static void PmSlaveClearAfterState ( PmSlave * const slv , const PmStateId prev ) { const PmStateId curr = slv -> node . currState ; if ( NULL != slv -> node . clocks ) { if ( ( 0U != ( slv -> slvFsm -> states [ prev ] & PM_CAP_CLOCK ) ) && ( 0U == ( slv -> slvFsm -> states [ curr ] & PM_CAP_CLOCK ) ) ) { PmClockRelease ( & slv -> node ) ; } } if ( NULL != slv -> node . parent ) { if ( ( 0U != ( slv -> slvFsm -> states [ prev ] & PM_CAP_POWER ) ) && ( 0U == ( slv -> slvFsm -> states [ curr ] & PM_CAP_POWER ) ) ) { PmPowerReleaseParent ( & slv -> node ) ; } } }
PmSlaveClearAfterState() - Clean after exiting a state
 @slv         Slave that exited the prev state
 @prev        Previous state the slave was in
PmSlaveClearAfterState () - Clean after exiting a state @slv Slave that exited the prev state @prev Previous state the slave was in
/* Check if slave doesn't use clocks in the new state */ /* Check if slave doesn't need power in the new state */