Lines Matching refs:i2c
43 static int flexcop_i2c_read4(struct flexcop_i2c_adapter *i2c, in flexcop_i2c_read4() argument
50 ret = flexcop_i2c_operation(i2c->fc, &r100); in flexcop_i2c_read4()
53 r100.tw_sm_c_100.no_base_addr_ack_error = i2c->no_base_addr; in flexcop_i2c_read4()
54 ret = flexcop_i2c_operation(i2c->fc, &r100); in flexcop_i2c_read4()
64 r104 = i2c->fc->read_ibi_reg(i2c->fc, tw_sm_c_104); in flexcop_i2c_read4()
96 int flexcop_i2c_request(struct flexcop_i2c_adapter *i2c, in flexcop_i2c_request() argument
112 r100.tw_sm_c_100.twoWS_port_reg = i2c->port; in flexcop_i2c_request()
115 printk(KERN_DEBUG "%d ", i2c->port); in flexcop_i2c_request()
127 if (i2c->no_base_addr && len == 0 && op == FC_WRITE) { in flexcop_i2c_request()
139 ret = flexcop_i2c_read4(i2c, r100, buf); in flexcop_i2c_request()
141 ret = flexcop_i2c_write4(i2c->fc, r100, buf); in flexcop_i2c_request()
168 struct flexcop_i2c_adapter *i2c = i2c_get_adapdata(i2c_adap); in flexcop_master_xfer() local
178 if (mutex_lock_interruptible(&i2c->fc->i2c_mutex)) in flexcop_master_xfer()
184 ret = i2c->fc->i2c_request(i2c, FC_READ, msgs[i].addr, in flexcop_master_xfer()
188 ret = i2c->fc->i2c_request(i2c, FC_WRITE, msgs[i].addr, in flexcop_master_xfer()
197 mutex_unlock(&i2c->fc->i2c_mutex); in flexcop_master_xfer()