Add infrastructure to probe per bus

Add some infrastructure around per-bus probing functions.  Each function
is provided a private parameter, e.g. the expected length of an ID. This
will allow us to implement probing functions that are only called as of-
ten as necessary. The results will be stored in the `registered_master`
structure, to be compared to database entries later.

The probe_buses() wrapper can be used for chip entries, and allows us to
transition the existing probing functions one by one. Once all functions
have been ported, probe_flash() can be adapted as well and the wrapper
will become obsolete.

Change-Id: I6e82b6d61df50234096ac39acab58a4014203933
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/74899
diff --git a/spi.c b/spi.c
index 9f8fb89..6f77e5c 100644
--- a/spi.c
+++ b/spi.c
@@ -163,7 +163,7 @@
 
 int register_spi_master(const struct spi_master *mst, size_t max_rom_decode, void *data)
 {
-	struct registered_master rmst;
+	struct registered_master rmst = { 0 };
 
 	if (mst->shutdown) {
 		if (register_shutdown(mst->shutdown, data)) {