libflashprog: Allow to query bus types, voltage, and test status

This is mostly an export of the long stable internal structures. We do
some renames, though,  and provide the voltage range as floating point
numbers. While we are at it, also rename:
* flashprog_test_status.wp      => .block_protection,
* BUS_PROG                      => BUS_OPAQUE,
* BUS_NONSPI                    => BUS_PRESPI.
The last one is a pseudonym for the older, memory-mapped buses, and
doesn't include BUS_OPAQUE.

Also try to name the captured test state consistently, either `tested`
or `status`.

Change-Id: Ibefb923fa5f566daa804651aa1a9bfe5602ca364
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/482
diff --git a/include/programmer.h b/include/programmer.h
index 88a7047..31c95f7 100644
--- a/include/programmer.h
+++ b/include/programmer.h
@@ -36,7 +36,7 @@
 struct dev_entry {
 	uint16_t vendor_id;
 	uint16_t device_id;
-	const enum test_state status;
+	const enum flashprog_test_state status;
 	const char *vendor_name;
 	const char *device_name;
 };
@@ -142,7 +142,7 @@
 	bool match_revision;
 	uint8_t revision_id;
 	enum chipbustype buses;
-	const enum test_state status;
+	const enum flashprog_test_state status;
 	const char *vendor_name;
 	const char *device_name;
 	int (*doit) (struct flashprog_programmer *, struct pci_dev *, const char *name);
@@ -184,7 +184,7 @@
 	const char *board_name;
 
 	int max_rom_decode_parallel;
-	const enum test_state status;
+	const enum flashprog_test_state status;
 	int (*enable) (struct flashprog_programmer *); /* May be NULL. */
 };
 
@@ -193,7 +193,7 @@
 struct board_info {
 	const char *vendor;
 	const char *name;
-	const enum test_state working;
+	const enum flashprog_test_state working;
 #ifdef CONFIG_PRINT_WIKI
 	const char *url;
 	const char *note;