Lines Matching defs:i2cctl

19 static void ixgbe_raise_i2c_clk(struct ixgbe_hw *hw, u32 *i2cctl);
20 static void ixgbe_lower_i2c_clk(struct ixgbe_hw *hw, u32 *i2cctl);
21 static int ixgbe_set_i2c_data(struct ixgbe_hw *hw, u32 *i2cctl, bool data);
22 static bool ixgbe_get_i2c_data(struct ixgbe_hw *hw, u32 *i2cctl);
2385 u32 i2cctl = IXGBE_READ_REG(hw, IXGBE_I2CCTL(hw));
2387 i2cctl |= IXGBE_I2C_BB_EN(hw);
2390 ixgbe_set_i2c_data(hw, &i2cctl, 1);
2391 ixgbe_raise_i2c_clk(hw, &i2cctl);
2396 ixgbe_set_i2c_data(hw, &i2cctl, 0);
2401 ixgbe_lower_i2c_clk(hw, &i2cctl);
2418 u32 i2cctl = IXGBE_READ_REG(hw, IXGBE_I2CCTL(hw));
2424 ixgbe_set_i2c_data(hw, &i2cctl, 0);
2425 ixgbe_raise_i2c_clk(hw, &i2cctl);
2430 ixgbe_set_i2c_data(hw, &i2cctl, 1);
2436 i2cctl &= ~bb_en_bit;
2437 i2cctl |= data_oe_bit | clk_oe_bit;
2438 IXGBE_WRITE_REG(hw, IXGBE_I2CCTL(hw), i2cctl);
2475 u32 i2cctl;
2487 i2cctl = IXGBE_READ_REG(hw, IXGBE_I2CCTL(hw));
2488 i2cctl |= IXGBE_I2C_DATA_OUT(hw);
2489 i2cctl |= IXGBE_I2C_DATA_OE_N_EN(hw);
2490 IXGBE_WRITE_REG(hw, IXGBE_I2CCTL(hw), i2cctl);
2504 u32 i2cctl = IXGBE_READ_REG(hw, IXGBE_I2CCTL(hw));
2512 i2cctl |= IXGBE_I2C_DATA_OUT(hw);
2513 i2cctl |= data_oe_bit;
2514 IXGBE_WRITE_REG(hw, IXGBE_I2CCTL(hw), i2cctl);
2517 ixgbe_raise_i2c_clk(hw, &i2cctl);
2525 i2cctl = IXGBE_READ_REG(hw, IXGBE_I2CCTL(hw));
2526 ack = ixgbe_get_i2c_data(hw, &i2cctl);
2538 ixgbe_lower_i2c_clk(hw, &i2cctl);
2555 u32 i2cctl = IXGBE_READ_REG(hw, IXGBE_I2CCTL(hw));
2559 i2cctl |= IXGBE_I2C_DATA_OUT(hw);
2560 i2cctl |= data_oe_bit;
2561 IXGBE_WRITE_REG(hw, IXGBE_I2CCTL(hw), i2cctl);
2564 ixgbe_raise_i2c_clk(hw, &i2cctl);
2569 i2cctl = IXGBE_READ_REG(hw, IXGBE_I2CCTL(hw));
2570 *data = ixgbe_get_i2c_data(hw, &i2cctl);
2572 ixgbe_lower_i2c_clk(hw, &i2cctl);
2589 u32 i2cctl = IXGBE_READ_REG(hw, IXGBE_I2CCTL(hw));
2592 status = ixgbe_set_i2c_data(hw, &i2cctl, data);
2594 ixgbe_raise_i2c_clk(hw, &i2cctl);
2599 ixgbe_lower_i2c_clk(hw, &i2cctl);
2615 * @i2cctl: Current value of I2CCTL register
2620 static void ixgbe_raise_i2c_clk(struct ixgbe_hw *hw, u32 *i2cctl)
2628 *i2cctl |= clk_oe_bit;
2629 IXGBE_WRITE_REG(hw, IXGBE_I2CCTL(hw), *i2cctl);
2633 *i2cctl |= IXGBE_I2C_CLK_OUT(hw);
2634 IXGBE_WRITE_REG(hw, IXGBE_I2CCTL(hw), *i2cctl);
2648 * @i2cctl: Current value of I2CCTL register
2653 static void ixgbe_lower_i2c_clk(struct ixgbe_hw *hw, u32 *i2cctl)
2656 *i2cctl &= ~IXGBE_I2C_CLK_OUT(hw);
2657 *i2cctl &= ~IXGBE_I2C_CLK_OE_N_EN(hw);
2659 IXGBE_WRITE_REG(hw, IXGBE_I2CCTL(hw), *i2cctl);
2669 * @i2cctl: Current value of I2CCTL register
2675 static int ixgbe_set_i2c_data(struct ixgbe_hw *hw, u32 *i2cctl, bool data)
2680 *i2cctl |= IXGBE_I2C_DATA_OUT(hw);
2682 *i2cctl &= ~IXGBE_I2C_DATA_OUT(hw);
2683 *i2cctl &= ~data_oe_bit;
2685 IXGBE_WRITE_REG(hw, IXGBE_I2CCTL(hw), *i2cctl);
2694 *i2cctl |= data_oe_bit;
2695 IXGBE_WRITE_REG(hw, IXGBE_I2CCTL(hw), *i2cctl);
2700 *i2cctl = IXGBE_READ_REG(hw, IXGBE_I2CCTL(hw));
2701 if (data != ixgbe_get_i2c_data(hw, i2cctl)) {
2712 * @i2cctl: Current value of I2CCTL register
2717 static bool ixgbe_get_i2c_data(struct ixgbe_hw *hw, u32 *i2cctl)
2722 *i2cctl |= data_oe_bit;
2723 IXGBE_WRITE_REG(hw, IXGBE_I2CCTL(hw), *i2cctl);
2728 if (*i2cctl & IXGBE_I2C_DATA_IN(hw))
2742 u32 i2cctl;
2746 i2cctl = IXGBE_READ_REG(hw, IXGBE_I2CCTL(hw));
2748 ixgbe_set_i2c_data(hw, &i2cctl, 1);
2751 ixgbe_raise_i2c_clk(hw, &i2cctl);
2756 ixgbe_lower_i2c_clk(hw, &i2cctl);