Lines Matching +full:product +full:- +full:name
1 // SPDX-License-Identifier: GPL-2.0+
103 serialnr->low = serial[0]; in get_board_serial()
104 serialnr->high = serial[1]; in get_board_serial()
152 * representation. i.e. for rev 1.00: 0x100 --> 0x64 in cl_eeprom_get_board_rev()
166 * @buf: buffer to store the product name
176 return -EINVAL; in cl_eeprom_get_product_name()
184 buf[PRODUCT_NAME_SIZE - 1] = '\0'; in cl_eeprom_get_product_name()
191 * eeprom_field_print_bin_ver() - print a "version field" which contains binary
199 * Field Name 123.45
205 if ((field->buf[0] == 0xff) && (field->buf[1] == 0xff)) { in eeprom_field_print_bin_ver()
206 field->buf[0] = 0; in eeprom_field_print_bin_ver()
207 field->buf[1] = 0; in eeprom_field_print_bin_ver()
210 printf(PRINT_FIELD_SEGMENT, field->name); in eeprom_field_print_bin_ver()
211 int major = (field->buf[1] << 8 | field->buf[0]) / 100; in eeprom_field_print_bin_ver()
212 int minor = (field->buf[1] << 8 | field->buf[0]) - major * 100; in eeprom_field_print_bin_ver()
217 * eeprom_field_update_bin_ver() - update a "version field" which contains
230 * Returns 0 on success, -1 on failure.
237 return -1; in eeprom_field_update_bin_ver()
241 return -1; in eeprom_field_update_bin_ver()
245 return -1; in eeprom_field_update_bin_ver()
249 return -1; in eeprom_field_update_bin_ver()
253 return -1; in eeprom_field_update_bin_ver()
255 field->buf[0] = (unsigned char)num; in eeprom_field_update_bin_ver()
256 field->buf[1] = num >> 8; in eeprom_field_update_bin_ver()
265 * eeprom_field_print_date() - print a field which contains date data
269 * Field Name 07/Feb/2014
270 * Field Name 56/BAD/9999
276 printf(PRINT_FIELD_SEGMENT, field->name); in eeprom_field_print_date()
277 printf("%02d/", field->buf[0]); in eeprom_field_print_date()
278 if (field->buf[1] >= 1 && field->buf[1] <= 12) in eeprom_field_print_date()
279 printf("%s", months[field->buf[1] - 1]); in eeprom_field_print_date()
283 printf("/%d\n", field->buf[3] << 8 | field->buf[2]); in eeprom_field_print_date()
300 return -1; in validate_date()
307 return -1; in validate_date()
319 return -1; in validate_date()
323 return -1; in validate_date()
330 * eeprom_field_update_date() - update a date field which contains binary data
343 * Returns 0 on success, -1 on failure.
353 printf("%s: syntax error\n", field->name); in eeprom_field_update_date()
354 return -1; in eeprom_field_update_date()
359 printf("%s: invalid day\n", field->name); in eeprom_field_update_date()
360 return -1; in eeprom_field_update_date()
365 if (!strcmp(tok2, months[month - 1])) in eeprom_field_update_date()
370 printf("%s: invalid year\n", field->name); in eeprom_field_update_date()
371 return -1; in eeprom_field_update_date()
374 if (validate_date(day, month - 1, year)) { in eeprom_field_update_date()
375 printf("%s: invalid date\n", field->name); in eeprom_field_update_date()
376 return -1; in eeprom_field_update_date()
380 printf("%s: year overflow\n", field->name); in eeprom_field_update_date()
381 return -1; in eeprom_field_update_date()
384 field->buf[0] = day; in eeprom_field_update_date()
385 field->buf[1] = month; in eeprom_field_update_date()
386 field->buf[2] = (unsigned char)year; in eeprom_field_update_date()
387 field->buf[3] = (unsigned char)(year >> 8); in eeprom_field_update_date()
423 { "Product Name", 16, NULL, DEFINE_PRINT_UPDATE(ascii) },
424 { "Product Options #1", 16, NULL, DEFINE_PRINT_UPDATE(ascii) },
425 { "Product Options #2", 16, NULL, DEFINE_PRINT_UPDATE(ascii) },
426 { "Product Options #3", 16, NULL, DEFINE_PRINT_UPDATE(ascii) },
445 { "Product Name", 16, NULL, DEFINE_PRINT_UPDATE(ascii) },
446 { "Product Options #1", 16, NULL, DEFINE_PRINT_UPDATE(ascii) },
447 { "Product Options #2", 16, NULL, DEFINE_PRINT_UPDATE(ascii) },
448 { "Product Options #3", 16, NULL, DEFINE_PRINT_UPDATE(ascii) },
465 { "Product Name", 16, NULL, DEFINE_PRINT_UPDATE(ascii) },
466 { "Product Options #1", 16, NULL, DEFINE_PRINT_UPDATE(ascii) },
467 { "Product Options #2", 16, NULL, DEFINE_PRINT_UPDATE(ascii) },
468 { "Product Options #3", 16, NULL, DEFINE_PRINT_UPDATE(ascii) },
475 switch (layout->layout_version) { in eeprom_layout_assign()
477 layout->fields = layout_legacy; in eeprom_layout_assign()
478 layout->num_of_fields = ARRAY_SIZE(layout_legacy); in eeprom_layout_assign()
481 layout->fields = layout_v1; in eeprom_layout_assign()
482 layout->num_of_fields = ARRAY_SIZE(layout_v1); in eeprom_layout_assign()
485 layout->fields = layout_v2; in eeprom_layout_assign()
486 layout->num_of_fields = ARRAY_SIZE(layout_v2); in eeprom_layout_assign()
489 layout->fields = layout_v3; in eeprom_layout_assign()
490 layout->num_of_fields = ARRAY_SIZE(layout_v3); in eeprom_layout_assign()