lib/sw_apps/zynqmp_pmufw/src/pm_slave.c
static s32 PmSlaveGetWakeUpLatency(const PmNode* const node, u32* const lat)
{
	PmSlave* const slave = (PmSlave*)node->derived;
	PmNode* powerNode;
	s32 status = XST_SUCCESS;
	u32 latency = 0U;

	*lat = PmGetLatencyFromState(slave, slave->node.currState);

	if (NULL == node->parent) {
		status = XST_NO_FEATURE;
		goto done;
	}

	powerNode = &node->parent->node;
	if (NULL == powerNode->class->getWakeUpLatency) {
		status = XST_NO_FEATURE;
		goto done;
	}

	status = powerNode->class->getWakeUpLatency(powerNode, &latency);
	if (XST_SUCCESS == status) {
		*lat += latency;
	}

done:
	return status;

}
/**
 * PmSlaveGetWakeUpLatency() - Get wake-up latency of the slave node
 * @node	Slave node
 * @lat		Pointer to the location where the latency value should be stored
 *
 * @return	XST_SUCCESS if latency value is stored in *lat, XST_NO_FEATURE
 *		if the latency depends on power parent which has no method
 *		(getWakeUpLatency) to provide latency information
 */
Get wake-up latency of the slave node
@node        Slave node
@lat         Pointer to the location where the latency value should be stored

@return      XST_SUCCESS if latency value is stored in *lat, XST_NO_FEATURE
if the latency depends on power parent which has no method
(getWakeUpLatency) to provide latency information
Get wake - up latency of the slave node @node Slave node @lat Pointer to the location where the latency value should be stored @return XST_SUCCESS if latency value is stored in * lat XST_NO_FEATURE if the latency depends on power parent which has no method ( getWakeUpLatency ) to provide latency information
static s32 PmSlaveGetWakeUpLatency(const PmNode* const node, u32* const lat)
{
	PmSlave* const slave = (PmSlave*)node->derived;
	PmNode* powerNode;
	s32 status = XST_SUCCESS;
	u32 latency = 0U;
	*lat = PmGetLatencyFromState(slave, slave->node.currState);
	if (NULL == node->parent) {
		status = XST_NO_FEATURE;
		goto done;
	}
	powerNode = &node->parent->node;
	if (NULL == powerNode->class->getWakeUpLatency) {
		status = XST_NO_FEATURE;
		goto done;
	}
	status = powerNode->class->getWakeUpLatency(powerNode, &latency);
	if (XST_SUCCESS == status) {
		*lat += latency;
	}
done:
	return status;
}
static s32 PmSlaveGetWakeUpLatency ( const PmNode * const node , u32 * const lat ) { PmSlave * const slave = ( PmSlave * ) node -> derived ; PmNode * powerNode ; s32 status = XST_SUCCESS ; u32 latency = 0U ; * lat = PmGetLatencyFromState ( slave , slave -> node . currState ) ; if ( NULL == node -> parent ) { status = XST_NO_FEATURE ; goto done ; } powerNode = & node -> parent -> node ; if ( NULL == powerNode -> class -> getWakeUpLatency ) { status = XST_NO_FEATURE ; goto done ; } status = powerNode -> class -> getWakeUpLatency ( powerNode , & latency ) ; if ( XST_SUCCESS == status ) { * lat += latency ; } done : return status ; }
PmSlaveGetWakeUpLatency() - Get wake-up latency of the slave node
 @node        Slave node
 @lat         Pointer to the location where the latency value should be stored
PmSlaveGetWakeUpLatency () - Get wake - up latency of the slave node @node Slave node @lat Pointer to the location where the latency value should be stored