drivers/linuxgpiod: add support for opendrain trst
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>
This commit is contained in:
parent
bac3ef96b7
commit
6fef2eca38
|
@ -360,7 +360,11 @@ static int linuxgpiod_init(void)
|
|||
goto out_error;
|
||||
|
||||
if (is_gpio_valid(trst_gpio)) {
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue