1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 22:21:16 +02:00

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>
This commit is contained in:
Daniel Thompson
2018-07-12 11:02:28 +01:00
committed by Nico Huber
parent ccfa8f9d9a
commit 1d507a07a9
5 changed files with 141 additions and 108 deletions

View File

@ -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__ */