Lines Matching defs:i2c
1640 struct gpi_i2c_config *i2c = chan->config;
1648 if (i2c->set_config) {
1652 tre->dword[0] = u32_encode_bits(i2c->low_count, TRE_I2C_C0_TLOW);
1653 tre->dword[0] |= u32_encode_bits(i2c->high_count, TRE_I2C_C0_THIGH);
1654 tre->dword[0] |= u32_encode_bits(i2c->cycle_count, TRE_I2C_C0_TCYL);
1655 tre->dword[0] |= u32_encode_bits(i2c->pack_enable, TRE_I2C_C0_TX_PACK);
1656 tre->dword[0] |= u32_encode_bits(i2c->pack_enable, TRE_I2C_C0_RX_PACK);
1660 tre->dword[2] = u32_encode_bits(i2c->clk_div, TRE_C0_CLK_DIV);
1667 if (i2c->op == I2C_WRITE) {
1671 if (i2c->multi_msg)
1674 tre->dword[0] = u32_encode_bits(i2c->op, TRE_I2C_GO_CMD);
1676 tre->dword[0] |= u32_encode_bits(i2c->addr, TRE_I2C_GO_ADDR);
1677 tre->dword[0] |= u32_encode_bits(i2c->stretch, TRE_I2C_GO_STRETCH);
1680 tre->dword[2] = u32_encode_bits(i2c->rx_len, TRE_RX_LEN);
1684 if (i2c->multi_msg)
1690 if (i2c->op == I2C_READ || i2c->multi_msg == false) {