aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/fbtft/fb_tls8204.c
diff options
context:
space:
mode:
authorNishad Kamdar <nishadkamdar@gmail.com>2019-01-16 23:00:50 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-18 11:01:02 +0100
commitc440eee1a7a1d0f2d5fc2ee6049e4a05da540f01 (patch)
tree60ec90b53ac2f8540b2a24a055cd086d9102c86c /drivers/staging/fbtft/fb_tls8204.c
parentstaging: android: ion: Remove unused headers (diff)
downloadlinux-dev-c440eee1a7a1d0f2d5fc2ee6049e4a05da540f01.tar.xz
linux-dev-c440eee1a7a1d0f2d5fc2ee6049e4a05da540f01.zip
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_tls8204.c')
-rw-r--r--drivers/staging/fbtft/fb_tls8204.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/fbtft/fb_tls8204.c b/drivers/staging/fbtft/fb_tls8204.c
index 277b6ed9c725..bec6dd0ffb01 100644
--- a/drivers/staging/fbtft/fb_tls8204.c
+++ b/drivers/staging/fbtft/fb_tls8204.c
@@ -12,7 +12,7 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/spi/spi.h>
#include <linux/delay.h>
@@ -94,7 +94,7 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)
/* The display is 102x68 but the LCD is 84x48.
* Set the write pointer at the start of each row.
*/
- gpio_set_value(par->gpio.dc, 0);
+ gpiod_set_value(par->gpio.dc, 0);
write_reg(par, 0x80 | 0);
write_reg(par, 0x40 | y);
@@ -109,7 +109,7 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)
*buf++ = ch;
}
/* Write the row */
- gpio_set_value(par->gpio.dc, 1);
+ gpiod_set_value(par->gpio.dc, 1);
ret = par->fbtftops.write(par, par->txbuf.buf, WIDTH);
if (ret < 0) {
dev_err(par->info->device,