blob: 04528928126606807f477cd3bac0dfae6c69cd84 [file] [log] [blame]
Simon Glass20142012014-12-10 08:55:54 -07001/*
2 * Copyright (c) 2014 Google, Inc
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#ifndef __I2C_EEPROM
8#define __I2C_EEPROM
9
10struct i2c_eeprom_ops {
11 int (*read)(struct udevice *dev, int offset, uint8_t *buf, int size);
12 int (*write)(struct udevice *dev, int offset, const uint8_t *buf,
13 int size);
14};
15
16struct i2c_eeprom {
mario.six@gdsys.ccd7e28912016-06-22 15:14:16 +020017 /* The EEPROM's page size in byte */
18 unsigned long pagesize;
19 /* The EEPROM's page width in bits (pagesize = 2^pagewidth) */
20 unsigned pagewidth;
Simon Glass20142012014-12-10 08:55:54 -070021};
22
23#endif