lib/sw_apps/zynqmp_pmufw/src/pm_slave.c
static s32 PmSlaveInit(PmNode* const node)
{
	PmSlave* const slave = (PmSlave*)node->derived;
	s32 status = XST_SUCCESS;

	if (NULL != node->parent) {
		if (HAS_CAPABILITIES(slave, node->currState, PM_CAP_POWER)) {
			status = PmPowerRequestParent(node);
			if (XST_SUCCESS != status) {
				goto done;
			}
		}
	}

	if (NULL != node->clocks) {
		if (HAS_CAPABILITIES(slave, node->currState, PM_CAP_CLOCK)) {
			status = PmClockRequest(node);
		}
	}

	if ((NULL != slave->class) && (NULL != slave->class->init)) {
		status = slave->class->init(slave);
	}

done:
	return status;
}
/**
 * PmSlaveInit() - Initialize the slave node
 * @node	Node to initialize
 *
 * @return	Status of initializing the node
 */
Initialize the slave node
@node        Node to initialize

@return      Status of initializing the node
Initialize the slave node @node Node to initialize @return Status of initializing the node
static s32 PmSlaveInit(PmNode* const node)
{
	PmSlave* const slave = (PmSlave*)node->derived;
	s32 status = XST_SUCCESS;
	if (NULL != node->parent) {
		if (HAS_CAPABILITIES(slave, node->currState, PM_CAP_POWER)) {
			status = PmPowerRequestParent(node);
			if (XST_SUCCESS != status) {
				goto done;
			}
		}
	}
	if (NULL != node->clocks) {
		if (HAS_CAPABILITIES(slave, node->currState, PM_CAP_CLOCK)) {
			status = PmClockRequest(node);
		}
	}
	if ((NULL != slave->class) && (NULL != slave->class->init)) {
		status = slave->class->init(slave);
	}
done:
	return status;
}
static s32 PmSlaveInit ( PmNode * const node ) { PmSlave * const slave = ( PmSlave * ) node -> derived ; s32 status = XST_SUCCESS ; if ( NULL != node -> parent ) { if ( HAS_CAPABILITIES ( slave , node -> currState , PM_CAP_POWER ) ) { status = PmPowerRequestParent ( node ) ; if ( XST_SUCCESS != status ) { goto done ; } } } if ( NULL != node -> clocks ) { if ( HAS_CAPABILITIES ( slave , node -> currState , PM_CAP_CLOCK ) ) { status = PmClockRequest ( node ) ; } } if ( ( NULL != slave -> class ) && ( NULL != slave -> class -> init ) ) { status = slave -> class -> init ( slave ) ; } done : return status ; }
PmSlaveInit() - Initialize the slave node
 @node        Node to initialize
PmSlaveInit () - Initialize the slave node @node Node to initialize