Lines Matching refs:len
65 char *buf, int len) in em2800_i2c_send_max4() argument
70 BUG_ON(len < 1 || len > 4); in em2800_i2c_send_max4()
71 b2[5] = 0x80 + len - 1; in em2800_i2c_send_max4()
74 if (len > 1) in em2800_i2c_send_max4()
76 if (len > 2) in em2800_i2c_send_max4()
78 if (len > 3) in em2800_i2c_send_max4()
81 ret = dev->em28xx_write_regs(dev, 4 - len, &b2[4 - len], 2 + len); in em2800_i2c_send_max4()
82 if (ret != 2 + len) { in em2800_i2c_send_max4()
89 if (ret == 0x80 + len - 1) in em2800_i2c_send_max4()
90 return len; in em2800_i2c_send_max4()
101 short len) in em2800_i2c_send_bytes() argument
109 while (len > 0) { in em2800_i2c_send_bytes()
110 count = (len > maxLen) ? maxLen : len; in em2800_i2c_send_bytes()
113 len -= count; in em2800_i2c_send_bytes()
162 char *buf, int len) in em2800_i2c_recv_bytes() argument
173 ret = dev->em28xx_read_reg_req_len(dev, 0x0, 0x3, buf, len); in em2800_i2c_recv_bytes()
187 short len, int stop) in em28xx_i2c_send_bytes() argument
192 wrcount = dev->em28xx_write_regs_req(dev, stop ? 2 : 3, addr, buf, len); in em28xx_i2c_send_bytes()
202 char *buf, int len) in em28xx_i2c_recv_bytes() argument
205 ret = dev->em28xx_read_reg_req_len(dev, 2, addr, buf, len); in em28xx_i2c_recv_bytes()
251 i == num - 1 ? "stop" : "nonstop", addr, msgs[i].len); in em28xx_i2c_xfer()
252 if (!msgs[i].len) { /* no len: check only for device presence */ in em28xx_i2c_xfer()
267 msgs[i].len); in em28xx_i2c_xfer()
271 msgs[i].len); in em28xx_i2c_xfer()
273 for (byte = 0; byte < msgs[i].len; byte++) in em28xx_i2c_xfer()
279 for (byte = 0; byte < msgs[i].len; byte++) in em28xx_i2c_xfer()
285 msgs[i].len); in em28xx_i2c_xfer()
289 msgs[i].len, in em28xx_i2c_xfer()
312 int len = 0; in em28xx_hash_mem() local
315 if (len == length) { in em28xx_hash_mem()
316 c = (char)len; in em28xx_hash_mem()
317 len = -1; in em28xx_hash_mem()
321 len++; in em28xx_hash_mem()
322 if ((len & (32 / 8 - 1)) == 0) in em28xx_hash_mem()
324 } while (len); in em28xx_hash_mem()
329 static int em28xx_i2c_eeprom(struct em28xx *dev, unsigned char *eedata, int len) in em28xx_i2c_eeprom() argument
333 int i, err, size = len, block; in em28xx_i2c_eeprom()
352 memset(eedata, 0, len); in em28xx_i2c_eeprom()
380 for (i = 0; i < len; i++) { in em28xx_i2c_eeprom()
389 dev->hash = em28xx_hash_mem(eedata, len, 32); in em28xx_i2c_eeprom()