src/dpdk/drivers/net/igc/base/igc_api.c
void igc_i2c_bus_clear(struct igc_hw *hw)
{
	u32 i2cctl = IGC_READ_REG(hw, IGC_I2CPARAMS);
	u32 i;

	DEBUGFUNC("igc_i2c_bus_clear");

	igc_i2c_start(hw);

	igc_set_i2c_data(hw, &i2cctl, 1);

	for (i = 0; i < 9; i++) {
		igc_raise_i2c_clk(hw, &i2cctl);

		/* Min high period of clock is 4us */
		usec_delay(IGC_I2C_T_HIGH);

		igc_lower_i2c_clk(hw, &i2cctl);

		/* Min low period of clock is 4.7us*/
		usec_delay(IGC_I2C_T_LOW);
	}

	igc_i2c_start(hw);

	/* Put the i2c bus back to default state */
	igc_i2c_stop(hw);
}
/**
 *  igc_i2c_bus_clear - Clears the I2C bus
 *  @hw: pointer to hardware structure
 *
 *  Clears the I2C bus by sending nine clock pulses.
 *  Used when data line is stuck low.
 **/
Clears the I2C bus
@hw: pointer to hardware structure

Clears the I2C bus by sending nine clock pulses.
Used when data line is stuck low.
Clears the I2C bus @hw : pointer to hardware structure Clears the I2C bus by sending nine clock pulses . Used when data line is stuck low .
void igc_i2c_bus_clear(struct igc_hw *hw)
{
	u32 i2cctl = IGC_READ_REG(hw, IGC_I2CPARAMS);
	u32 i;
	DEBUGFUNC("igc_i2c_bus_clear");
	igc_i2c_start(hw);
	igc_set_i2c_data(hw, &i2cctl, 1);
	for (i = 0; i < 9; i++) {
		igc_raise_i2c_clk(hw, &i2cctl);
		usec_delay(IGC_I2C_T_HIGH);
		igc_lower_i2c_clk(hw, &i2cctl);
		usec_delay(IGC_I2C_T_LOW);
	}
	igc_i2c_start(hw);
	igc_i2c_stop(hw);
}
void igc_i2c_bus_clear ( struct igc_hw * hw ) { u32 i2cctl = IGC_READ_REG ( hw , IGC_I2CPARAMS ) ; u32 i ; DEBUGFUNC ( " " ) ; igc_i2c_start ( hw ) ; igc_set_i2c_data ( hw , & i2cctl , 1 ) ; for ( i = 0 ; i < 9 ; i ++ ) { igc_raise_i2c_clk ( hw , & i2cctl ) ; usec_delay ( IGC_I2C_T_HIGH ) ; igc_lower_i2c_clk ( hw , & i2cctl ) ; usec_delay ( IGC_I2C_T_LOW ) ; } igc_i2c_start ( hw ) ; igc_i2c_stop ( hw ) ; }
igc_i2c_bus_clear - Clears the I2C bus
  @hw: pointer to hardware structure
igc_i2c_bus_clear - Clears the I2C bus @hw : pointer to hardware structure
/* Min high period of clock is 4us */ /* Min low period of clock is 4.7us*/ /* Put the i2c bus back to default state */