diff options
author | Jan Sebastian Götte <linux@jaseg.net> | 2019-07-17 17:41:37 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-25 11:09:29 +0300 |
commit | 92e3e884887c0d278042fbbb6f6c9b41d6addb71 (patch) | |
tree | d431fb21f1a93e43ae13cbd9da8cf6c033518e57 /drivers/staging/fbtft/fb_upd161704.c | |
parent | 610504301235e6d7c5a8505d1d3401bed0403d05 (diff) | |
download | linux-92e3e884887c0d278042fbbb6f6c9b41d6addb71.tar.xz |
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.c | 2 |
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 */ |