Introduce a priority for bus-probing functions

We want to stop probing once anything was detected by specific,
high-priority probing functions. This can benefit, for example,
the probing of non-flash chips on the SPI bus. So far we didn't
probe for these automatically, because the probing commands can
be misunderstood by SPI flashes.

We'll invoke the probing functions in order of their priority,
starting with priority `0'. Once any of them returns something
that doesn't look like continuous 0 or 1 bits,  we'll skip all
probing functions with less priority.

Change-Id: Ibde3c348a2fb84b71c325a6c2719e9f2c8b5e784
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/418
diff --git a/include/chipdrivers/probing.h b/include/chipdrivers/probing.h
index 8aaf8ed..561d6ef 100644
--- a/include/chipdrivers/probing.h
+++ b/include/chipdrivers/probing.h
@@ -72,6 +72,7 @@
 struct master_common;
 
 struct bus_probe {
+	unsigned int priority;
 	enum id_type type;
 	struct found_id *(*run)(const struct bus_probe *, const struct master_common *);
 	void *arg;