i2c_eeprom.h 488 B

1234567891011121314151617181920212223
  1. /*
  2. * Copyright (c) 2014 Google, Inc
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef __I2C_EEPROM
  7. #define __I2C_EEPROM
  8. struct i2c_eeprom_ops {
  9. int (*read)(struct udevice *dev, int offset, uint8_t *buf, int size);
  10. int (*write)(struct udevice *dev, int offset, const uint8_t *buf,
  11. int size);
  12. };
  13. struct i2c_eeprom {
  14. /* The EEPROM's page size in byte */
  15. unsigned long pagesize;
  16. /* The EEPROM's page width in bits (pagesize = 2^pagewidth) */
  17. unsigned pagewidth;
  18. };
  19. #endif