1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * (C) Copyright 2009-2016 CompuLab, Ltd.
12 #include <eeprom_field.h>
14 #define RESERVED_FIELDS NULL
15 #define LAYOUT_VERSION_UNRECOGNIZED -1
16 #define LAYOUT_VERSION_AUTODETECT -2
18 struct eeprom_layout {
19 struct eeprom_field *fields;
24 void (*print)(const struct eeprom_layout *eeprom_layout);
25 int (*update)(struct eeprom_layout *eeprom_layout, char *field_name,
29 struct eeprom_field *eeprom_layout_find_field(struct eeprom_layout *layout,
30 char *field_name, bool warn);
31 void eeprom_layout_setup(struct eeprom_layout *layout, unsigned char *buf,
32 unsigned int buf_size, int layout_version);
33 __weak void __eeprom_layout_assign(struct eeprom_layout *layout,