1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 08:42:12 +02:00

dm: Add a simple EEPROM driver

There seem to be a few EEPROM drivers around - perhaps we should have a
single standard one? This simple driver is used for sandbox testing, but
could be pressed into more active service.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
This commit is contained in:
Simon Glass
2014-12-10 08:55:54 -07:00
parent 776f96f513
commit 20142019a9
4 changed files with 72 additions and 0 deletions

19
include/i2c_eeprom.h Normal file
View File

@@ -0,0 +1,19 @@
/*
* Copyright (c) 2014 Google, Inc
*
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __I2C_EEPROM
#define __I2C_EEPROM
struct i2c_eeprom_ops {
int (*read)(struct udevice *dev, int offset, uint8_t *buf, int size);
int (*write)(struct udevice *dev, int offset, const uint8_t *buf,
int size);
};
struct i2c_eeprom {
};
#endif