Lines Matching refs:count
60 static inline size_t w1_f1C_fix_count(loff_t off, size_t count, size_t size) in w1_f1C_fix_count() argument
65 if ((off + count) > size) in w1_f1C_fix_count()
68 return count; in w1_f1C_fix_count()
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()
123 if (count == 0) in eeprom_read()
130 max_page = (off + count - 1) >> W1_PAGE_BITS; in eeprom_read()
133 count = -EIO; 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()
145 return count; in eeprom_read()
224 loff_t off, size_t count) in eeprom_write() argument
230 count = w1_f1C_fix_count(off, count, W1_EEPROM_SIZE); in eeprom_write()
231 if (count == 0) in eeprom_write()
236 if ((off & W1_PAGE_MASK) || (count & W1_PAGE_MASK)) { in eeprom_write()
238 (int)off, count); in eeprom_write()
243 for (idx = 0; idx < count; idx += W1_PAGE_SIZE) { in eeprom_write()
257 while (idx < count) { in eeprom_write()
260 if (len > (count - idx)) in eeprom_write()
261 len = count - idx; in eeprom_write()
264 count = -EIO; in eeprom_write()
273 return count; in eeprom_write()
280 size_t count) in pio_read() argument
287 if (off != 0 || count != 1 || buf == NULL) in pio_read()
291 ret = w1_f1C_read(sl, W1_1C_REG_LOGIC_STATE, count, buf); in pio_read()
299 size_t count) in pio_write() argument
307 if (off != 0 || count != 1 || buf == NULL) in pio_write()
334 return count; in pio_write()
346 const char *buf, size_t count) in crccheck_store() argument
353 return count; in crccheck_store()