usbdev: Extract libusb1 device discovery into a separate file

This is a backport of the upstream `commit 1d507a07` in
preparation for pulling the upstream dediprog driver into
our tree.

The upstream patch has been greatly modified to align
better with our tree and we fix the missing
'#include <inttypes.h>' here.

TEST=still builds

Change-Id: I76eb9a86a63cda5ae9469b8d861d7b1df85dbf58
Signed-off-by: Edward O'Callaghan <>
Reviewed-by: Martin Roth <>
4 files changed