Lines Matching refs:off
60 static inline size_t w1_f1C_fix_count(loff_t off, size_t count, size_t size)
62 if (off > size)
65 if ((off + count) > size)
66 return size - off;
75 int off = block * W1_PAGE_SIZE;
86 wrbuf[1] = off & 0xff;
87 wrbuf[2] = off >> 8;
89 w1_read_block(sl->master, &data->memory[off], W1_PAGE_SIZE);
92 if (crc16(CRC16_INIT, &data->memory[off], W1_PAGE_SIZE) == CRC16_VALID)
116 loff_t off, size_t count)
122 count = w1_f1C_fix_count(off, count, W1_EEPROM_SIZE);
129 min_page = (off >> W1_PAGE_BITS);
130 max_page = (off + count - 1) >> W1_PAGE_BITS;
137 memcpy(buf, &data->memory[off], count);
139 count = w1_f1C_read(sl, off, count, buf);
227 loff_t off, size_t count)
233 count = w1_f1C_fix_count(off, count, W1_EEPROM_SIZE);
239 if ((off & W1_PAGE_MASK) || (count & W1_PAGE_MASK)) {
240 dev_err(&sl->dev, "invalid offset/count off=%d cnt=%zd\n",
241 (int)off, count);
250 (int)off);
261 addr = off + idx;
282 const struct bin_attribute *bin_attr, char *buf, loff_t off,
290 if (off != 0 || count != 1 || buf == NULL)
302 loff_t off, size_t count)
310 if (off != 0 || count != 1 || buf == NULL)