cli_classic: Use libflashprog's probing and enumeration APIs
Now that the probing API is more powerful and handles multiple chip
matches just like the CLI, we can save a few lines and have cleaner
code. What is left is the forced chip probing (for forced reads),
which isn't and probably shouldn't be supported by the API.
Change-Id: I3227fff8e44ff41b61c2b5f500130b01543f4b58
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/486
diff --git a/include/chipdrivers/probing.h b/include/chipdrivers/probing.h
index 2e081d1..7bca406 100644
--- a/include/chipdrivers/probing.h
+++ b/include/chipdrivers/probing.h
@@ -91,6 +91,7 @@
struct flashprog_chips;
struct flashprog_flashctx;
struct flashprog_programmer;
+const struct flashchip *flashprog_chip_by_name(const char *chip_name);
const struct master_common *flashprog_chip_probe(const struct flashprog_programmer *, const struct flashchip *);
int flashprog_flash_prepare_context(struct flashprog_flashctx **, const struct flashprog_programmer *, const struct master_common *, const struct flashchip *);