This is a follow-up to
2f424b7eb, which added support for opendrain
srst, finishing up support for opendrain reset signals.
Signed-off-by: Alex Crawford <openocd@code.acrawford.com>
Change-Id: Ib79b2e12f2a9469fd6c53bb839c0d2e8e46103a4
Reviewed-on: https://review.openocd.org/c/openocd/+/6598
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
goto out_error;
if (is_gpio_valid(trst_gpio)) {
- gpiod_trst = helper_get_output_line("trst", trst_gpio, 1);
+ if (jtag_get_reset_config() & RESET_TRST_OPEN_DRAIN)
+ gpiod_trst = helper_get_open_drain_output_line("trst", trst_gpio, 1);
+ else
+ gpiod_trst = helper_get_output_line("trst", trst_gpio, 1);
+
if (!gpiod_trst)
goto out_error;
}