Lines Matching refs:off

67 static inline size_t w1_f1C_fix_count(loff_t off, size_t count, size_t size)  in w1_f1C_fix_count()  argument
69 if (off > size) in w1_f1C_fix_count()
72 if ((off + count) > size) in w1_f1C_fix_count()
73 return size - off; in w1_f1C_fix_count()
82 int off = block * W1_PAGE_SIZE; in w1_f1C_refresh_block() local
93 wrbuf[1] = off & 0xff; in w1_f1C_refresh_block()
94 wrbuf[2] = off >> 8; in w1_f1C_refresh_block()
96 w1_read_block(sl->master, &data->memory[off], W1_PAGE_SIZE); in w1_f1C_refresh_block()
99 if (crc16(CRC16_INIT, &data->memory[off], W1_PAGE_SIZE) == CRC16_VALID) in w1_f1C_refresh_block()
123 loff_t off, size_t count) in eeprom_read() argument
129 count = w1_f1C_fix_count(off, count, W1_EEPROM_SIZE); in eeprom_read()
136 min_page = (off >> W1_PAGE_BITS); in eeprom_read()
137 max_page = (off + count - 1) >> W1_PAGE_BITS; in eeprom_read()
144 memcpy(buf, &data->memory[off], count); in eeprom_read()
146 count = w1_f1C_read(sl, off, count, buf); in eeprom_read()
231 loff_t off, size_t count) in eeprom_write() argument
237 count = w1_f1C_fix_count(off, count, W1_EEPROM_SIZE); in eeprom_write()
243 if ((off & W1_PAGE_MASK) || (count & W1_PAGE_MASK)) { in eeprom_write()
245 (int)off, count); in eeprom_write()
254 (int)off); in eeprom_write()
265 addr = off + idx; in eeprom_write()
286 struct bin_attribute *bin_attr, char *buf, loff_t off, in pio_read() argument
294 if (off != 0 || count != 1 || buf == NULL) in pio_read()
305 struct bin_attribute *bin_attr, char *buf, loff_t off, in pio_write() argument
314 if (off != 0 || count != 1 || buf == NULL) in pio_write()