diff options
author | Daniel Thompson <daniel.thompson@linaro.org> | 2018-07-12 11:02:28 +0100 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2018-08-30 09:53:58 +0000 |
commit | 1d507a07a919f49e74aa05803bf37919ac95adb1 (patch) | |
tree | 24d460c41877990f4a6724c0e8b4513e2d679daa /programmer.h | |
parent | ccfa8f9d9a68b1e4238d2dbbc4e9c8bcf9bae8a6 (diff) | |
download | flashrom-1d507a07a919f49e74aa05803bf37919ac95adb1.tar.gz flashrom-1d507a07a919f49e74aa05803bf37919ac95adb1.tar.bz2 flashrom-1d507a07a919f49e74aa05803bf37919ac95adb1.zip |
usbdev: Extract libusb1 device discovery into a separate file
Currently there is a TODO-like comment in the dediprog driver: "Might be
useful for other USB devices as well". Act on this comment by collecting
all the device discovery code for libusb1 devices into a separate file.
Change-Id: Idfcc79371241c2c1dea97faf5e532aa971546a79
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Reviewed-on: https://review.coreboot.org/27443
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'programmer.h')
-rw-r--r-- | programmer.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/programmer.h b/programmer.h index 300cf5f1..311992a0 100644 --- a/programmer.h +++ b/programmer.h @@ -841,4 +841,12 @@ static inline bool spi_master_4ba(const struct flashctx *const flash) flash->mst->spi.features & SPI_MASTER_4BA; } +/* usbdev.c */ +struct libusb_device_handle; +struct libusb_context; +struct libusb_device_handle *usb_dev_get_by_vid_pid_serial( + struct libusb_context *usb_ctx, uint16_t vid, uint16_t pid, const char *serialno); +struct libusb_device_handle *usb_dev_get_by_vid_pid_number( + struct libusb_context *usb_ctx, uint16_t vid, uint16_t pid, unsigned int num); + #endif /* !__PROGRAMMER_H__ */ |