src/dpdk/drivers/net/igc/base/igc_api.c
s32 igc_set_i2c_bb(struct igc_hw *hw)
{
	s32 ret_val = IGC_SUCCESS;
	u32 ctrl_ext, i2cparams;

	DEBUGFUNC("igc_set_i2c_bb");

	ctrl_ext = IGC_READ_REG(hw, IGC_CTRL_EXT);
	ctrl_ext |= IGC_CTRL_I2C_ENA;
	IGC_WRITE_REG(hw, IGC_CTRL_EXT, ctrl_ext);
	IGC_WRITE_FLUSH(hw);

	i2cparams = IGC_READ_REG(hw, IGC_I2CPARAMS);
	i2cparams |= IGC_I2CBB_EN;
	i2cparams |= IGC_I2C_DATA_OE_N;
	i2cparams |= IGC_I2C_CLK_OE_N;
	IGC_WRITE_REG(hw, IGC_I2CPARAMS, i2cparams);
	IGC_WRITE_FLUSH(hw);

	return ret_val;
}
/**
 *  igc_set_i2c_bb - Enable I2C bit-bang
 *  @hw: pointer to the HW structure
 *
 *  Enable I2C bit-bang interface
 *
 **/
Enable I2C bit-bang
@hw: pointer to the HW structure

Enable I2C bit-bang interface
Enable I2C bit - bang @hw : pointer to the HW structure Enable I2C bit - bang interface
s32 igc_set_i2c_bb(struct igc_hw *hw)
{
	s32 ret_val = IGC_SUCCESS;
	u32 ctrl_ext, i2cparams;
	DEBUGFUNC("igc_set_i2c_bb");
	ctrl_ext = IGC_READ_REG(hw, IGC_CTRL_EXT);
	ctrl_ext |= IGC_CTRL_I2C_ENA;
	IGC_WRITE_REG(hw, IGC_CTRL_EXT, ctrl_ext);
	IGC_WRITE_FLUSH(hw);
	i2cparams = IGC_READ_REG(hw, IGC_I2CPARAMS);
	i2cparams |= IGC_I2CBB_EN;
	i2cparams |= IGC_I2C_DATA_OE_N;
	i2cparams |= IGC_I2C_CLK_OE_N;
	IGC_WRITE_REG(hw, IGC_I2CPARAMS, i2cparams);
	IGC_WRITE_FLUSH(hw);
	return ret_val;
}
s32 igc_set_i2c_bb ( struct igc_hw * hw ) { s32 ret_val = IGC_SUCCESS ; u32 ctrl_ext , i2cparams ; DEBUGFUNC ( " " ) ; ctrl_ext = IGC_READ_REG ( hw , IGC_CTRL_EXT ) ; ctrl_ext |= IGC_CTRL_I2C_ENA ; IGC_WRITE_REG ( hw , IGC_CTRL_EXT , ctrl_ext ) ; IGC_WRITE_FLUSH ( hw ) ; i2cparams = IGC_READ_REG ( hw , IGC_I2CPARAMS ) ; i2cparams |= IGC_I2CBB_EN ; i2cparams |= IGC_I2C_DATA_OE_N ; i2cparams |= IGC_I2C_CLK_OE_N ; IGC_WRITE_REG ( hw , IGC_I2CPARAMS , i2cparams ) ; IGC_WRITE_FLUSH ( hw ) ; return ret_val ; }
igc_set_i2c_bb - Enable I2C bit-bang
  @hw: pointer to the HW structure
igc_set_i2c_bb - Enable I2C bit - bang @hw : pointer to the HW structure