Patrick Georgi | 55189c9 | 2020-05-10 20:09:31 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Stefan Reinauer | 6540ae5 | 2007-07-12 16:35:42 +0000 | [diff] [blame] | 2 | |
Uwe Hermann | 6e56594 | 2008-03-01 19:06:32 +0000 | [diff] [blame] | 3 | #ifndef INPUT_FILE_H |
| 4 | #define INPUT_FILE_H |
Stefan Reinauer | 6540ae5 | 2007-07-12 16:35:42 +0000 | [diff] [blame] | 5 | |
| 6 | #include "common.h" |
Stefan Reinauer | a67aab7 | 2008-09-27 10:08:28 +0000 | [diff] [blame] | 7 | #include "layout.h" |
Stefan Reinauer | 6540ae5 | 2007-07-12 16:35:42 +0000 | [diff] [blame] | 8 | |
| 9 | typedef struct cmos_write_t cmos_write_t; |
| 10 | |
Stefan Reinauer | 90b96b6 | 2010-01-13 21:00:23 +0000 | [diff] [blame] | 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. |
Stefan Reinauer | 6540ae5 | 2007-07-12 16:35:42 +0000 | [diff] [blame] | 15 | */ |
Stefan Reinauer | 90b96b6 | 2010-01-13 21:00:23 +0000 | [diff] [blame] | 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 | }; |
Stefan Reinauer | 6540ae5 | 2007-07-12 16:35:42 +0000 | [diff] [blame] | 23 | |
Stefan Reinauer | 90b96b6 | 2010-01-13 21:00:23 +0000 | [diff] [blame] | 24 | cmos_write_t *process_input_file(FILE * f); |
| 25 | void do_cmos_writes(cmos_write_t * list); |
Stefan Reinauer | 6540ae5 | 2007-07-12 16:35:42 +0000 | [diff] [blame] | 26 | |
| 27 | extern const char assignment_regex[]; |
| 28 | |
Stefan Reinauer | 90b96b6 | 2010-01-13 21:00:23 +0000 | [diff] [blame] | 29 | #endif /* INPUT_FILE_H */ |