Lines Matching defs:i2c

4  * flexcop-i2c.c - flexcop internal 2Wire bus (I2C) and dvb i2c initialization
21 fc->write_ibi_reg(fc, tw_sm_c_100, *r100); /* initiating i2c operation */
29 deb_i2c("i2c success\n");
33 deb_i2c("suffering from an i2c ack_error\n");
37 deb_i2c("tried %d times i2c operation, never finished or too many ack errors.\n",
42 static int flexcop_i2c_read4(struct flexcop_i2c_adapter *i2c,
53 * the ITD1000 is behind an i2c-gate which closes automatically
54 * after an i2c-transaction the STV0297 needs 2 consecutive reads
59 if (i2c->fc->dev_type == FC_SKY_REV27)
60 r100.tw_sm_c_100.no_base_addr_ack_error = i2c->no_base_addr;
62 ret = flexcop_i2c_operation(i2c->fc, &r100);
65 r100.tw_sm_c_100.no_base_addr_ack_error = i2c->no_base_addr;
66 ret = flexcop_i2c_operation(i2c->fc, &r100);
76 r104 = i2c->fc->read_ibi_reg(i2c->fc, tw_sm_c_104);
102 /* write the additional i2c data before doing the actual i2c operation */
107 int flexcop_i2c_request(struct flexcop_i2c_adapter *i2c,
120 i2c->port,
126 r100.tw_sm_c_100.twoWS_port_reg = i2c->port;
131 if (i2c->no_base_addr && len == 0 && op == FC_WRITE) {
145 ret = flexcop_i2c_read4(i2c, r100, p);
147 ret = flexcop_i2c_write4(i2c->fc, r100, p);
157 i2c->port,
163 /* exported for PCI i2c */
170 struct flexcop_i2c_adapter *i2c = i2c_get_adapdata(i2c_adap);
180 if (mutex_lock_interruptible(&i2c->fc->i2c_mutex))
186 ret = i2c->fc->i2c_request(i2c, FC_READ, msgs[i].addr,
191 ret = i2c->fc->i2c_request(i2c, FC_WRITE, msgs[i].addr,
195 deb_i2c("i2c master_xfer failed");
200 mutex_unlock(&i2c->fc->i2c_mutex);