diff options
-rw-r--r-- | src/jtag/drivers/linuxgpiod.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/jtag/drivers/linuxgpiod.c b/src/jtag/drivers/linuxgpiod.c index dd50b44..75f6152 100644 --- a/src/jtag/drivers/linuxgpiod.c +++ b/src/jtag/drivers/linuxgpiod.c @@ -360,7 +360,11 @@ static int linuxgpiod_init(void) 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; } |