From: Antonio Borneo Date: Fri, 11 Jan 2019 17:29:38 +0000 (+0100) Subject: drivers/imx_gpio: fix polarity of srst and trst X-Git-Tag: v0.11.0-rc1~850 X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=commitdiff_plain;h=0d48104e03320112db1e8825d0700ea8be735cef;hp=a1b308abd4b867e9d3127dee5b9c5906bdf24f99 drivers/imx_gpio: fix polarity of srst and trst The comment above the function is correct, but the code set the GPIO with wrong (reversed) polarity. Change-Id: Ifd09688150d3d2018af73521e0da3926bb1b7f84 Signed-off-by: Antonio Borneo Reviewed-on: http://openocd.zylin.com/4847 Tested-by: jenkins Reviewed-by: Grzegorz Kostka Reviewed-by: Tomas Vanek --- diff --git a/src/jtag/drivers/imx_gpio.c b/src/jtag/drivers/imx_gpio.c index 2a822afe97..f42692c38d 100644 --- a/src/jtag/drivers/imx_gpio.c +++ b/src/jtag/drivers/imx_gpio.c @@ -160,10 +160,10 @@ static int imx_gpio_swd_write(int tck, int tms, int tdi) static int imx_gpio_reset(int trst, int srst) { if (trst_gpio != -1) - trst ? gpio_set(trst_gpio) : gpio_clear(trst_gpio); + trst ? gpio_clear(trst_gpio) : gpio_set(trst_gpio); if (srst_gpio != -1) - srst ? gpio_set(srst_gpio) : gpio_clear(srst_gpio); + srst ? gpio_clear(srst_gpio) : gpio_set(srst_gpio); return ERROR_OK; }