summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Reid <preid@electromag.com.au>2019-07-16 08:24:37 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-25 09:18:21 +0200
commitb918d1c2706619cb0712a61cc8c05148b68b24b2 (patch)
treec7c473ac8fae0dbd7695c5fec4eb1c0053f8fadb
parentdbc4f989c878fe101fb7920e9609e8ec44e097cd (diff)
downloadtalos-op-linux-b918d1c2706619cb0712a61cc8c05148b68b24b2.tar.gz
talos-op-linux-b918d1c2706619cb0712a61cc8c05148b68b24b2.zip
Staging: fbtft: Fix reset assertion when using gpio descriptor
Typically gpiod_set_value calls would assert the reset line and then release it using the symantics of: gpiod_set_value(par->gpio.reset, 0); ... delay gpiod_set_value(par->gpio.reset, 1); And the gpio binding would specify the polarity. Prior to conversion to gpiod calls the polarity in the DT was ignored and assumed to be active low. Fix it so that DT polarity is respected. Fixes: c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Tested-by: Jan Sebastian Götte <linux@jaseg.net> Signed-off-by: Phil Reid <preid@electromag.com.au> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/1563236677-5045-3-git-send-email-preid@electromag.com.au Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/fbtft/fbtft-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index b963cccdc3f6..c3179cc847f8 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -231,9 +231,9 @@ static void fbtft_reset(struct fbtft_par *par)
if (!par->gpio.reset)
return;
fbtft_par_dbg(DEBUG_RESET, par, "%s()\n", __func__);
- gpiod_set_value_cansleep(par->gpio.reset, 0);
- usleep_range(20, 40);
gpiod_set_value_cansleep(par->gpio.reset, 1);
+ usleep_range(20, 40);
+ gpiod_set_value_cansleep(par->gpio.reset, 0);
msleep(120);
}
OpenPOWER on IntegriCloud