Lines Matching defs:len
141 * @param len length must be <= (W1_F2D_PAGE_SIZE - (addr & W1_F2D_PAGE_MASK))
145 static int w1_f2d_write(struct w1_slave *sl, int addr, int len, const u8 *data)
150 u8 es = (addr + len - 1) % W1_F2D_SCRATCH_SIZE;
163 w1_write_block(sl->master, data, len);
170 w1_read_block(sl->master, rdbuf, len + 3);
174 (rdbuf[2] != es) || (memcmp(data, &rdbuf[3], len) != 0)) {
208 int addr, len;
219 len = count;
220 while (len > 0) {
222 /* if len too short or addr not aligned */
223 if (len < W1_F2D_SCRATCH_SIZE || addr & W1_F2D_SCRATCH_MASK) {
233 /* copy at most to the boundary of the PAGE or len */
237 if (copy > len)
238 copy = len;
256 len -= copy;