lib/sw_apps/zynqmp_pmufw/src/idle_hooks.c
void NodeI2cIdle(u32 BaseAddress)
{
	u32 StatusReg;
	u32 Timeout = MAX_TIMEOUT;

	/* Check whether the I2C bus is busy */
	do {
		StatusReg = XIicPs_ReadReg(BaseAddress,
					   XIICPS_SR_OFFSET);
	} while (((StatusReg & XIICPS_SR_BA_MASK) != 0x0U) && --Timeout);
	if (Timeout == 0) {
		PmWarn("i2c not idle\r\n");
	}
}
/**
 * NodeI2cIdle() - Custom code to idle the I2c
 *
 * @BaseAddress: I2c base address
 */
Custom code to idle the I2c
@BaseAddress: I2c base address
Custom code to idle the I2c @BaseAddress : I2c base address
void NodeI2cIdle(u32 BaseAddress)
{
	u32 StatusReg;
	u32 Timeout = MAX_TIMEOUT;
	do {
		StatusReg = XIicPs_ReadReg(BaseAddress,
					   XIICPS_SR_OFFSET);
	} while (((StatusReg & XIICPS_SR_BA_MASK) != 0x0U) && --Timeout);
	if (Timeout == 0) {
		PmWarn("i2c not idle\r\n");
	}
}
void NodeI2cIdle ( u32 BaseAddress ) { u32 StatusReg ; u32 Timeout = MAX_TIMEOUT ; do { StatusReg = XIicPs_ReadReg ( BaseAddress , XIICPS_SR_OFFSET ) ; } while ( ( ( StatusReg & XIICPS_SR_BA_MASK ) != 0x0U ) && -- Timeout ) ; if ( Timeout == 0 ) { PmWarn ( " \r \n " ) ; } }
NodeI2cIdle() - Custom code to idle the I2c
 @BaseAddress: I2c base address
NodeI2cIdle () - Custom code to idle the I2c @BaseAddress : I2c base address
/* Check whether the I2C bus is busy */