lib/sw_apps/zynqmp_pmufw/src/pm_slave.c
static u32 PmGetLatencyFromState(const PmSlave* const slave,
			  const PmStateId state)
{
	u32 i, latency = 0U;
	PmStateId highestState = (PmStateId)slave->slvFsm->statesCnt - 1U;

	for (i = 0U; i < slave->slvFsm->transCnt; i++) {
		if ((state == slave->slvFsm->trans[i].fromState) &&
		    (highestState == slave->slvFsm->trans[i].toState)) {
			latency = slave->slvFsm->trans[i].latency;
			break;
		}
	}

	return latency;
}
/**
 * PmGetLatencyFromToState() - Get latency from given state to the highest state
 * @slave       Pointer to the slave whose states are in question
 * @state       State from which the latency is calculated
 *
 * @return      Return value for the found latency
 */
Get latency from given state to the highest state
@slave       Pointer to the slave whose states are in question
@state       State from which the latency is calculated

@return      Return value for the found latency
Get latency from given state to the highest state @slave Pointer to the slave whose states are in question @state State from which the latency is calculated @return Return value for the found latency
static u32 PmGetLatencyFromState(const PmSlave* const slave,
			  const PmStateId state)
{
	u32 i, latency = 0U;
	PmStateId highestState = (PmStateId)slave->slvFsm->statesCnt - 1U;
	for (i = 0U; i < slave->slvFsm->transCnt; i++) {
		if ((state == slave->slvFsm->trans[i].fromState) &&
		    (highestState == slave->slvFsm->trans[i].toState)) {
			latency = slave->slvFsm->trans[i].latency;
			break;
		}
	}
	return latency;
}
static u32 PmGetLatencyFromState ( const PmSlave * const slave , const PmStateId state ) { u32 i , latency = 0U ; PmStateId highestState = ( PmStateId ) slave -> slvFsm -> statesCnt - 1U ; for ( i = 0U ; i < slave -> slvFsm -> transCnt ; i ++ ) { if ( ( state == slave -> slvFsm -> trans [ i ] . fromState ) && ( highestState == slave -> slvFsm -> trans [ i ] . toState ) ) { latency = slave -> slvFsm -> trans [ i ] . latency ; break ; } } return latency ; }
PmGetLatencyFromToState() - Get latency from given state to the highest state
 @slave       Pointer to the slave whose states are in question
 @state       State from which the latency is calculated
PmGetLatencyFromToState () - Get latency from given state to the highest state @slave Pointer to the slave whose states are in question @state State from which the latency is calculated