src/dpdk/drivers/net/igc/base/igc_api.c
static s32 igc_set_i2c_data(struct igc_hw *hw, u32 *i2cctl, bool data)
{
	s32 status = IGC_SUCCESS;

	DEBUGFUNC("igc_set_i2c_data");

	if (data)
		*i2cctl |= IGC_I2C_DATA_OUT;
	else
		*i2cctl &= ~IGC_I2C_DATA_OUT;

	*i2cctl &= ~IGC_I2C_DATA_OE_N;
	*i2cctl |= IGC_I2C_CLK_OE_N;
	IGC_WRITE_REG(hw, IGC_I2CPARAMS, *i2cctl);
	IGC_WRITE_FLUSH(hw);

	/* Data rise/fall (1000ns/300ns) and set-up time (250ns) */
	usec_delay(IGC_I2C_T_RISE + IGC_I2C_T_FALL + IGC_I2C_T_SU_DATA);

	*i2cctl = IGC_READ_REG(hw, IGC_I2CPARAMS);
	if (data != igc_get_i2c_data(i2cctl)) {
		status = IGC_ERR_I2C;
		DEBUGOUT1("Error - I2C data was not set to %X.\n", data);
	}

	return status;
}
/**
 *  igc_set_i2c_data - Sets the I2C data bit
 *  @hw: pointer to hardware structure
 *  @i2cctl: Current value of I2CCTL register
 *  @data: I2C data value (0 or 1) to set
 *
 *  Sets the I2C data bit
 **/
Sets the I2C data bit
@hw: pointer to hardware structure
@i2cctl: Current value of I2CCTL register
@data: I2C data value (0 or 1) to set

Sets the I2C data bit
Sets the I2C data bit @hw : pointer to hardware structure @i2cctl : Current value of I2CCTL register @data : I2C data value ( 0 or 1 ) to set Sets the I2C data bit
static s32 igc_set_i2c_data(struct igc_hw *hw, u32 *i2cctl, bool data)
{
	s32 status = IGC_SUCCESS;
	DEBUGFUNC("igc_set_i2c_data");
	if (data)
		*i2cctl |= IGC_I2C_DATA_OUT;
	else
		*i2cctl &= ~IGC_I2C_DATA_OUT;
	*i2cctl &= ~IGC_I2C_DATA_OE_N;
	*i2cctl |= IGC_I2C_CLK_OE_N;
	IGC_WRITE_REG(hw, IGC_I2CPARAMS, *i2cctl);
	IGC_WRITE_FLUSH(hw);
	usec_delay(IGC_I2C_T_RISE + IGC_I2C_T_FALL + IGC_I2C_T_SU_DATA);
	*i2cctl = IGC_READ_REG(hw, IGC_I2CPARAMS);
	if (data != igc_get_i2c_data(i2cctl)) {
		status = IGC_ERR_I2C;
		DEBUGOUT1("Error - I2C data was not set to %X.\n", data);
	}
	return status;
}
static s32 igc_set_i2c_data ( struct igc_hw * hw , u32 * i2cctl , bool data ) { s32 status = IGC_SUCCESS ; DEBUGFUNC ( " " ) ; if ( data ) * i2cctl |= IGC_I2C_DATA_OUT ; else * i2cctl &= ~ IGC_I2C_DATA_OUT ; * i2cctl &= ~ IGC_I2C_DATA_OE_N ; * i2cctl |= IGC_I2C_CLK_OE_N ; IGC_WRITE_REG ( hw , IGC_I2CPARAMS , * i2cctl ) ; IGC_WRITE_FLUSH ( hw ) ; usec_delay ( IGC_I2C_T_RISE + IGC_I2C_T_FALL + IGC_I2C_T_SU_DATA ) ; * i2cctl = IGC_READ_REG ( hw , IGC_I2CPARAMS ) ; if ( data != igc_get_i2c_data ( i2cctl ) ) { status = IGC_ERR_I2C ; DEBUGOUT1 ( " \n " , data ) ; } return status ; }
igc_set_i2c_data - Sets the I2C data bit
  @hw: pointer to hardware structure
  @i2cctl: Current value of I2CCTL register
  @data: I2C data value (0 or 1) to set
igc_set_i2c_data - Sets the I2C data bit @hw : pointer to hardware structure @i2cctl : Current value of I2CCTL register @data : I2C data value ( 0 or 1 ) to set
/* Data rise/fall (1000ns/300ns) and set-up time (250ns) */