• Home
  • Raw
  • Download

Lines Matching refs:count

206 				      unsigned int offset, size_t count)  in at24_eeprom_read_smbus()  argument
214 if (count > io_limit) in at24_eeprom_read_smbus()
215 count = io_limit; in at24_eeprom_read_smbus()
218 if (count > I2C_SMBUS_BLOCK_MAX) in at24_eeprom_read_smbus()
219 count = I2C_SMBUS_BLOCK_MAX; in at24_eeprom_read_smbus()
231 count, buf); in at24_eeprom_read_smbus()
234 count, offset, status, jiffies); in at24_eeprom_read_smbus()
236 if (status == count) in at24_eeprom_read_smbus()
237 return count; in at24_eeprom_read_smbus()
246 unsigned int offset, size_t count) in at24_eeprom_read_i2c() argument
257 if (count > io_limit) in at24_eeprom_read_i2c()
258 count = io_limit; in at24_eeprom_read_i2c()
278 msg[1].len = count; in at24_eeprom_read_i2c()
290 status = count; in at24_eeprom_read_i2c()
293 count, offset, status, jiffies); in at24_eeprom_read_i2c()
295 if (status == count) in at24_eeprom_read_i2c()
296 return count; in at24_eeprom_read_i2c()
305 unsigned int offset, size_t count) in at24_eeprom_read_serial() argument
346 msg[1].len = count; in at24_eeprom_read_serial()
358 return count; in at24_eeprom_read_serial()
367 unsigned int offset, size_t count) in at24_eeprom_read_mac() argument
386 msg[1].len = count; in at24_eeprom_read_mac()
398 return count; in at24_eeprom_read_mac()
416 unsigned int offset, size_t count) in at24_adjust_write_count() argument
421 if (count > at24->write_max) in at24_adjust_write_count()
422 count = at24->write_max; in at24_adjust_write_count()
426 if (offset + count > next_page) in at24_adjust_write_count()
427 count = next_page - offset; in at24_adjust_write_count()
429 return count; in at24_adjust_write_count()
434 unsigned int offset, size_t count) in at24_eeprom_write_smbus_block() argument
441 count = at24_adjust_write_count(at24, offset, count); in at24_eeprom_write_smbus_block()
452 offset, count, buf); in at24_eeprom_write_smbus_block()
454 status = count; in at24_eeprom_write_smbus_block()
457 count, offset, status, jiffies); in at24_eeprom_write_smbus_block()
459 if (status == count) in at24_eeprom_write_smbus_block()
460 return count; in at24_eeprom_write_smbus_block()
470 unsigned int offset, size_t count) in at24_eeprom_write_smbus_byte() argument
488 status = count; in at24_eeprom_write_smbus_byte()
491 count, offset, status, jiffies); in at24_eeprom_write_smbus_byte()
493 if (status == count) in at24_eeprom_write_smbus_byte()
494 return count; in at24_eeprom_write_smbus_byte()
503 unsigned int offset, size_t count) in at24_eeprom_write_i2c() argument
512 count = at24_adjust_write_count(at24, offset, count); in at24_eeprom_write_i2c()
523 memcpy(&msg.buf[i], buf, count); in at24_eeprom_write_i2c()
524 msg.len = i + count; in at24_eeprom_write_i2c()
536 status = count; in at24_eeprom_write_i2c()
539 count, offset, status, jiffies); in at24_eeprom_write_i2c()
541 if (status == count) in at24_eeprom_write_i2c()
542 return count; in at24_eeprom_write_i2c()
550 static int at24_read(void *priv, unsigned int off, void *val, size_t count) in at24_read() argument
555 if (unlikely(!count)) in at24_read()
556 return count; in at24_read()
558 if (off + count > at24->chip.byte_len) in at24_read()
567 while (count) { in at24_read()
570 status = at24->read_func(at24, buf, off, count); in at24_read()
577 count -= status; in at24_read()
585 static int at24_write(void *priv, unsigned int off, void *val, size_t count) in at24_write() argument
590 if (unlikely(!count)) in at24_write()
593 if (off + count > at24->chip.byte_len) in at24_write()
602 while (count) { in at24_write()
605 status = at24->write_func(at24, buf, off, count); in at24_write()
612 count -= status; in at24_write()