Lines Matching refs:off
66 static inline size_t w1_f1C_fix_count(loff_t off, size_t count, size_t size) in w1_f1C_fix_count() argument
68 if (off > size) in w1_f1C_fix_count()
71 if ((off + count) > size) in w1_f1C_fix_count()
72 return size - off; in w1_f1C_fix_count()
81 int off = block * W1_PAGE_SIZE; in w1_f1C_refresh_block() local
92 wrbuf[1] = off & 0xff; in w1_f1C_refresh_block()
93 wrbuf[2] = off >> 8; in w1_f1C_refresh_block()
95 w1_read_block(sl->master, &data->memory[off], W1_PAGE_SIZE); in w1_f1C_refresh_block()
98 if (crc16(CRC16_INIT, &data->memory[off], W1_PAGE_SIZE) == CRC16_VALID) in w1_f1C_refresh_block()
122 char *buf, loff_t off, size_t count) in w1_f1C_read_bin() argument
128 count = w1_f1C_fix_count(off, count, W1_EEPROM_SIZE); in w1_f1C_read_bin()
135 min_page = (off >> W1_PAGE_BITS); in w1_f1C_read_bin()
136 max_page = (off + count - 1) >> W1_PAGE_BITS; in w1_f1C_read_bin()
143 memcpy(buf, &data->memory[off], count); in w1_f1C_read_bin()
145 count = w1_f1C_read(sl, off, count, buf); in w1_f1C_read_bin()
230 char *buf, loff_t off, size_t count) in w1_f1C_write_bin() argument
236 count = w1_f1C_fix_count(off, count, W1_EEPROM_SIZE); in w1_f1C_write_bin()
242 if ((off & W1_PAGE_MASK) || (count & W1_PAGE_MASK)) { in w1_f1C_write_bin()
244 (int)off, count); in w1_f1C_write_bin()
253 (int)off); in w1_f1C_write_bin()
264 addr = off + idx; in w1_f1C_write_bin()
284 char *buf, loff_t off, size_t count) in w1_f1C_read_pio() argument
291 if (off != 0 || count != 1 || buf == NULL) in w1_f1C_read_pio()
303 char *buf, loff_t off, size_t count) in w1_f1C_write_pio() argument
311 if (off != 0 || count != 1 || buf == NULL) in w1_f1C_write_pio()