aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/fbtft/fb_upd161704.c
diff options
context:
space:
mode:
authorJan Sebastian Götte <linux@jaseg.net>2019-07-17 23:41:37 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-25 10:09:29 +0200
commit92e3e884887c0d278042fbbb6f6c9b41d6addb71 (patch)
treed431fb21f1a93e43ae13cbd9da8cf6c033518e57 /drivers/staging/fbtft/fb_upd161704.c
parentstaging: unisys: visornic: Update the description of 'poll_for_irq()' (diff)
downloadlinux-dev-92e3e884887c0d278042fbbb6f6c9b41d6addb71.tar.xz
linux-dev-92e3e884887c0d278042fbbb6f6c9b41d6addb71.zip
Staging: fbtft: Fix GPIO handling
Commit c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") breaks GPIO handling. In several places, checks to only set a GPIO if it was configured ended up backwards. I have tested this fix. The fixed driver works with a ili9486 display connected to a raspberry pi via SPI. Fixes: c440eee1a7a1d ("Staging: fbtft: Switch to the gpio descriptor interface") Tested-by: Jan Sebastian Götte <linux@jaseg.net> Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Signed-off-by: Jan Sebastian Götte <linux@jaseg.net> Link: https://lore.kernel.org/r/75ada52f-afa1-08bc-d0ce-966fc1110e70@jaseg.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fbtft/fb_upd161704.c')
-rw-r--r--drivers/staging/fbtft/fb_upd161704.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/fbtft/fb_upd161704.c b/drivers/staging/fbtft/fb_upd161704.c
index 564a38e34440..c77832ae5e5b 100644
--- a/drivers/staging/fbtft/fb_upd161704.c
+++ b/drivers/staging/fbtft/fb_upd161704.c
@@ -26,7 +26,7 @@ static int init_display(struct fbtft_par *par)
{
par->fbtftops.reset(par);
- if (!par->gpio.cs)
+ if (par->gpio.cs)
gpiod_set_value(par->gpio.cs, 0); /* Activate chip */
/* Initialization sequence from Lib_UTFT */