Lines Matching full:layout
14 #define NO_LAYOUT_FIELDS "Unknown layout. Dumping raw data\n"
22 * eeprom_layout_detect() - detect layout based on the contents of the data.
25 * Returns: the detected layout version.
33 * __eeprom_layout_assign() - set the layout fields
34 * @layout: A pointer to an existing struct layout.
35 * @layout_version: The version number of the desired layout
37 __weak void __eeprom_layout_assign(struct eeprom_layout *layout, in __eeprom_layout_assign() argument
40 layout->fields = layout_unknown; in __eeprom_layout_assign()
41 layout->num_of_fields = ARRAY_SIZE(layout_unknown); in __eeprom_layout_assign()
43 void eeprom_layout_assign(struct eeprom_layout *layout, int layout_version) \
47 * eeprom_layout_print() - print the layout and the data which is assigned to it
48 * @layout: A pointer to an existing struct layout.
50 static void eeprom_layout_print(const struct eeprom_layout *layout) in eeprom_layout_print() argument
53 struct eeprom_field *fields = layout->fields; in eeprom_layout_print()
55 for (i = 0; i < layout->num_of_fields; i++) in eeprom_layout_print()
60 * eeprom_layout_update_field() - update a single field in the layout data.
61 * @layout: A pointer to an existing struct layout.
67 static int eeprom_layout_update_field(struct eeprom_layout *layout, in eeprom_layout_update_field() argument
71 struct eeprom_field *fields = layout->fields; in eeprom_layout_update_field()
79 for (i = 0; i < layout->num_of_fields; i++) { in eeprom_layout_update_field()
97 * eeprom_layout_setup() - setup layout struct with the layout data and
99 * @layout: A pointer to an existing struct layout.
102 * @layout version: The version number of the layout.
104 void eeprom_layout_setup(struct eeprom_layout *layout, unsigned char *buf, in eeprom_layout_setup() argument
110 layout->layout_version = eeprom_layout_detect(buf); in eeprom_layout_setup()
112 layout->layout_version = layout_version; in eeprom_layout_setup()
114 eeprom_layout_assign(layout, layout_version); in eeprom_layout_setup()
115 layout->data = buf; in eeprom_layout_setup()
116 for (i = 0; i < layout->num_of_fields; i++) { in eeprom_layout_setup()
117 layout->fields[i].buf = buf; in eeprom_layout_setup()
118 buf += layout->fields[i].size; in eeprom_layout_setup()
121 layout->data_size = buf_size; in eeprom_layout_setup()
122 layout->print = eeprom_layout_print; in eeprom_layout_setup()
123 layout->update = eeprom_layout_update_field; in eeprom_layout_setup()