summaryrefslogtreecommitdiff
path: root/drivers/staging/fbtft/fb_ssd1289.c
diff options
context:
space:
mode:
authorNishad Kamdar <nishadkamdar@gmail.com>2019-01-16 20:30:50 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-18 13:01:02 +0300
commitc440eee1a7a1d0f2d5fc2ee6049e4a05da540f01 (patch)
tree60ec90b53ac2f8540b2a24a055cd086d9102c86c /drivers/staging/fbtft/fb_ssd1289.c
parent032ecb59aa3878d6d9984068d715ab9ce7e2e503 (diff)
downloadlinux-c440eee1a7a1d0f2d5fc2ee6049e4a05da540f01.tar.xz
Staging: fbtft: Switch to the gpio descriptor interface
This switches the fbtft driver to use GPIO descriptors rather than numerical gpios: Utilize the GPIO library's intrinsic handling of OF GPIOs and polarity. If the line is flagged active low, gpiolib will deal with this. Remove gpios from platform device structure. Neither assign statically numbers to gpios in platform device nor allow gpios to be parsed as module parameters. Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fbtft/fb_ssd1289.c')
-rw-r--r--drivers/staging/fbtft/fb_ssd1289.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/fbtft/fb_ssd1289.c b/drivers/staging/fbtft/fb_ssd1289.c
index c9b18b3ba4ab..bbf75f795234 100644
--- a/drivers/staging/fbtft/fb_ssd1289.c
+++ b/drivers/staging/fbtft/fb_ssd1289.c
@@ -10,7 +10,7 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include "fbtft.h"
@@ -28,8 +28,8 @@ static int init_display(struct fbtft_par *par)
{
par->fbtftops.reset(par);
- if (par->gpio.cs != -1)
- gpio_set_value(par->gpio.cs, 0); /* Activate chip */
+ if (!par->gpio.cs)
+ gpiod_set_value(par->gpio.cs, 0); /* Activate chip */
write_reg(par, 0x00, 0x0001);
write_reg(par, 0x03, 0xA8A4);