Lines Matching refs:i

160 	int addr, rc, i, byte;  in tm6000_i2c_xfer()  local
164 for (i = 0; i < num; i++) { in tm6000_i2c_xfer()
165 addr = (msgs[i].addr << 1) & 0xff; in tm6000_i2c_xfer()
167 (msgs[i].flags & I2C_M_RD) ? "read" : "write", in tm6000_i2c_xfer()
168 i == num - 1 ? "stop" : "nonstop", addr, msgs[i].len); in tm6000_i2c_xfer()
169 if (msgs[i].flags & I2C_M_RD) { in tm6000_i2c_xfer()
180 } else if (i + 1 < num && msgs[i].len <= 2 && in tm6000_i2c_xfer()
181 (msgs[i + 1].flags & I2C_M_RD) && in tm6000_i2c_xfer()
182 msgs[i].addr == msgs[i + 1].addr) { in tm6000_i2c_xfer()
185 for (byte = 0; byte < msgs[i].len; byte++) in tm6000_i2c_xfer()
186 printk(KERN_CONT " %02x", msgs[i].buf[byte]); in tm6000_i2c_xfer()
188 i == num - 2 ? "stop" : "nonstop", in tm6000_i2c_xfer()
189 msgs[i + 1].len); in tm6000_i2c_xfer()
191 if (msgs[i].len == 2) { in tm6000_i2c_xfer()
193 msgs[i].buf[0] << 8 | msgs[i].buf[1], in tm6000_i2c_xfer()
194 msgs[i + 1].buf, msgs[i + 1].len); in tm6000_i2c_xfer()
196 rc = tm6000_i2c_recv_regs(dev, addr, msgs[i].buf[0], in tm6000_i2c_xfer()
197 msgs[i + 1].buf, msgs[i + 1].len); in tm6000_i2c_xfer()
200 i++; in tm6000_i2c_xfer()
207 for (byte = 0; byte < msgs[i].len; byte++) in tm6000_i2c_xfer()
208 printk(KERN_CONT " %02x", msgs[i].buf[byte]); in tm6000_i2c_xfer()
212 for (byte = 0; byte < msgs[i].len; byte++) in tm6000_i2c_xfer()
213 printk(KERN_CONT " %02x", msgs[i].buf[byte]); in tm6000_i2c_xfer()
214 rc = tm6000_i2c_send_regs(dev, addr, msgs[i].buf[0], in tm6000_i2c_xfer()
215 msgs[i].buf + 1, msgs[i].len - 1); in tm6000_i2c_xfer()
231 int i, rc; in tm6000_i2c_eeprom() local
239 for (i = 0; i < sizeof(dev->eedata); ) { in tm6000_i2c_eeprom()
240 *p = i; in tm6000_i2c_eeprom()
241 rc = tm6000_i2c_recv_regs(dev, 0xa0, i, p, 1); in tm6000_i2c_eeprom()
254 if (0 == (i % 16)) in tm6000_i2c_eeprom()
255 printk(KERN_INFO "%s: i2c eeprom %02x:", dev->name, i); in tm6000_i2c_eeprom()
256 printk(KERN_CONT " %02x", dev->eedata[i]); in tm6000_i2c_eeprom()
257 if ((dev->eedata[i] >= ' ') && (dev->eedata[i] <= 'z')) in tm6000_i2c_eeprom()
258 bytes[i%16] = dev->eedata[i]; in tm6000_i2c_eeprom()
260 bytes[i%16] = '.'; in tm6000_i2c_eeprom()
262 i++; in tm6000_i2c_eeprom()
264 if (0 == (i % 16)) { in tm6000_i2c_eeprom()
269 if (0 != (i%16)) { in tm6000_i2c_eeprom()
270 bytes[i%16] = '\0'; in tm6000_i2c_eeprom()
271 for (i %= 16; i < 16; i++) in tm6000_i2c_eeprom()