From a1b308abd4b867e9d3127dee5b9c5906bdf24f99 Mon Sep 17 00:00:00 2001 From: Oleksij Rempel Date: Wed, 27 Jun 2018 14:54:21 +0200 Subject: jtag: drivers: provide initial support for usb path filtering With this patch drivers will be able to use usb path filtering. The path format is identical to the format provided by linux kernel: bus-port.port.... With this format it should be easier just to copy and paste path found in dmesg. Change-Id: I8bafa6fcb7a66ff68cc961a376f97f4f3dee35aa Signed-off-by: Oleksij Rempel Reviewed-on: http://openocd.zylin.com/4580 Tested-by: jenkins Reviewed-by: Matthias Welwarsky --- src/jtag/drivers/jtag_usb_common.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/jtag/drivers/jtag_usb_common.h (limited to 'src/jtag/drivers/jtag_usb_common.h') diff --git a/src/jtag/drivers/jtag_usb_common.h b/src/jtag/drivers/jtag_usb_common.h new file mode 100644 index 00000000..8c03742e --- /dev/null +++ b/src/jtag/drivers/jtag_usb_common.h @@ -0,0 +1,14 @@ +/* + * SPDX-License-Identifier: GPL-2.0+ + * Copyright (c) 2018 Pengutronix, Oleksij Rempel + */ + +#ifndef OPENOCD_JTAG_USB_COMMON_H +#define OPENOCD_JTAG_USB_COMMON_H + +void jtag_usb_set_location(const char *location); +const char *jtag_usb_get_location(void); +bool jtag_usb_location_equal(uint8_t dev_bus, uint8_t *port_path, + size_t path_len); + +#endif /* OPENOCD_JTAG_USB_COMMON_H */ -- cgit v1.2.3-18-g5258