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