128 byte reads are much more common than 32 byte reads. The message passing + setup/teardown for a read is much more expensive, in terms of time, than the reading itself. A slightly bigger struct is well worth the time savings. This reduces read times for /dev/eeprom from 57 seconds per 4KB to 14 seconds. Additionally, make sending the page address in the eeprom driver and utility optional. This can save a little time when reading within the same page and allows support for smaller devices that don't support pages (example: chips containing EDID). Change-Id: Ie48087caee40c11fa241d1555fce9309ddd27b43
8 lines
234 B
C
8 lines
234 B
C
#ifndef __EEPROMREAD_H
|
|
#define __EEPROMREAD_H
|
|
|
|
int eeprom_read(int fd, i2c_addr_t addr, uint16_t memaddr, void *buf,
|
|
size_t buflen, int flags);
|
|
int board_info(int fd, i2c_addr_t address, int flags);
|
|
|
|
#endif /* __EEPROMREAD_H */
|