1 /* SPDX-License-Identifier: GPL-2.0+
3 * Copyright (c) 2015 Free Electrons
4 * Copyright (c) 2015 NextThing Co
5 * Copyright (c) 2018 Microchip Technology, Inc.
14 struct w1_eeprom_ops {
16 * Reads a buff from the given EEPROM memory, starting at
17 * given offset and place the results into the given buffer.
18 * Should read given count of bytes.
19 * Should return 0 on success, and normal error.h on error
21 int (*read_buf)(struct udevice *dev, unsigned int offset,
22 u8 *buf, unsigned int count);
25 int w1_eeprom_read_buf(struct udevice *dev, unsigned int offset,
26 u8 *buf, unsigned int count);
28 int w1_eeprom_dm_init(void);
30 int w1_eeprom_get_id(struct udevice *dev, u64 *id);