libflashprog: Add new API to probe all buses for chips
The new flashprog_chips_probe() will supersede our existing logic to
probe for an unspecified chip. It returns an enumeration of detected
chips. It's up to the caller to handle multiple chip matches.
Change-Id: I21ec201b92289995430130d72823fe4ca8b03bb6
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/483
diff --git a/include/libflashprog.h b/include/libflashprog.h
index eec69ee..8afd8d5 100644
--- a/include/libflashprog.h
+++ b/include/libflashprog.h
@@ -49,6 +49,8 @@
__attribute__((nonnull))
int flashprog_chips_all(struct flashprog_chips **);
__attribute__((nonnull))
+int flashprog_chips_probe(struct flashprog_chips **, const struct flashprog_programmer *);
+__attribute__((nonnull))
unsigned int flashprog_chips_count(const struct flashprog_chips *);
void flashprog_chips_release(struct flashprog_chips *);