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