2 * Copyright (c) 2014 Google, Inc
4 * SPDX-License-Identifier: GPL-2.0+
11 #include <i2c_eeprom.h>
13 static int i2c_eeprom_read(struct udevice *dev, int offset, uint8_t *buf,
19 static int i2c_eeprom_write(struct udevice *dev, int offset,
20 const uint8_t *buf, int size)
25 struct i2c_eeprom_ops i2c_eeprom_std_ops = {
26 .read = i2c_eeprom_read,
27 .write = i2c_eeprom_write,
30 int i2c_eeprom_std_probe(struct udevice *dev)
35 static const struct udevice_id i2c_eeprom_std_ids[] = {
36 { .compatible = "i2c-eeprom" },
40 U_BOOT_DRIVER(i2c_eeprom_std) = {
42 .id = UCLASS_I2C_EEPROM,
43 .of_match = i2c_eeprom_std_ids,
44 .probe = i2c_eeprom_std_probe,
45 .priv_auto_alloc_size = sizeof(struct i2c_eeprom),
46 .ops = &i2c_eeprom_std_ops,
49 UCLASS_DRIVER(i2c_eeprom) = {
50 .id = UCLASS_I2C_EEPROM,