| 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #ifndef INPUT_FILE_H |
| 4 | #define INPUT_FILE_H |
| 5 | |
| 6 | #include "common.h" |
| 7 | #include "layout.h" |
| 8 | |
| 9 | typedef struct cmos_write_t cmos_write_t; |
| 10 | |
| 11 | /* This represents a pending CMOS write operation. When changing |
| 12 | * multiple CMOS parameter values, we first represent the changes as a |
| 13 | * list of pending write operations. This allows us to sanity check all |
| 14 | * write operations before any of them are performed. |
| 15 | */ |
| 16 | struct cmos_write_t { |
| 17 | unsigned bit; |
| 18 | unsigned length; |
| 19 | cmos_entry_config_t config; |
| 20 | unsigned long long value; |
| 21 | cmos_write_t *next; |
| 22 | }; |
| 23 | |
| 24 | cmos_write_t *process_input_file(FILE * f); |
| 25 | void do_cmos_writes(cmos_write_t * list); |
| 26 | |
| 27 | extern const char assignment_regex[]; |
| 28 | |
| 29 | #endif /* INPUT_FILE_H */ |