lib/sw_apps/zynqmp_pmufw/src/pm_slave.c
u32 PmSlaveGetUsageStatus(const PmSlave* const slave,
			  const PmMaster* const master)
{
	u32 usageStatus = 0U;
	const PmRequirement* req = slave->reqs;

	while (NULL != req) {

		if (MASTER_REQUESTED_SLAVE(req)) {
			/* This master is currently using this slave */
			if (master == req->master) {
				usageStatus |= PM_USAGE_CURRENT_MASTER;
			} else {
				usageStatus |= PM_USAGE_OTHER_MASTER;
			}
		}
		req = req->nextMaster;
	}

	return usageStatus;
}
/**
 * PmSlaveGetUsageStatus() - get current usage status for a slave node
 * @slave      Slave node for which the usage status is requested
 * @master     Master that's requesting the current usage status
 *
 * @return  Usage status:
 *	    - 0: No master is currently using the node
 *	    - 1: Only requesting master is currently using the node
 *	    - 2: Only other masters (1 or more) are currently using the node
 *	    - 3: Both the current and at least one other master is currently
 *               using the node
 */
get current usage status for a slave node
@slave      Slave node for which the usage status is requested
@master     Master that's requesting the current usage status


get current usage status for a slave node @slave Slave node for which the usage status is requested @master Master that ' s requesting the current usage status
u32 PmSlaveGetUsageStatus(const PmSlave* const slave,
			  const PmMaster* const master)
{
	u32 usageStatus = 0U;
	const PmRequirement* req = slave->reqs;
	while (NULL != req) {
		if (MASTER_REQUESTED_SLAVE(req)) {
			if (master == req->master) {
				usageStatus |= PM_USAGE_CURRENT_MASTER;
			} else {
				usageStatus |= PM_USAGE_OTHER_MASTER;
			}
		}
		req = req->nextMaster;
	}
	return usageStatus;
}
u32 PmSlaveGetUsageStatus ( const PmSlave * const slave , const PmMaster * const master ) { u32 usageStatus = 0U ; const PmRequirement * req = slave -> reqs ; while ( NULL != req ) { if ( MASTER_REQUESTED_SLAVE ( req ) ) { if ( master == req -> master ) { usageStatus |= PM_USAGE_CURRENT_MASTER ; } else { usageStatus |= PM_USAGE_OTHER_MASTER ; } } req = req -> nextMaster ; } return usageStatus ; }
PmSlaveGetUsageStatus() - get current usage status for a slave node
 @slave      Slave node for which the usage status is requested
 @master     Master that's requesting the current usage status
PmSlaveGetUsageStatus () - get current usage status for a slave node @slave Slave node for which the usage status is requested @master Master that ' s requesting the current usage status
/* This master is currently using this slave */