Thread (30 messages) 30 messages, 3 authors, 2018-12-04

[PATCH 13/26] Staging: fbtft: fb_ili9325: Switch to the gpio descriptor interface

From: Nishad Kamdar <hidden>
Date: 2018-11-25 11:35:22
Also in: dri-devel, lkml
Subsystem: fbtft framebuffer drivers, staging subsystem, the rest · Maintainers: Andy Shevchenko, Greg Kroah-Hartman, Linus Torvalds

This switches the fb_ili9325.c to use GPIO descriptors
rather than numerical gpios.

Signed-off-by: Nishad Kamdar <redacted>
---
 drivers/staging/fbtft/fb_ili9325.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/fbtft/fb_ili9325.c b/drivers/staging/fbtft/fb_ili9325.c
index 2cf75f2e03e2..b090e7ab6fdd 100644
--- a/drivers/staging/fbtft/fb_ili9325.c
+++ b/drivers/staging/fbtft/fb_ili9325.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 <linux/delay.h>
 
 #include "fbtft.h"
@@ -85,8 +85,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 */
 
 	bt &= 0x07;
 	vc &= 0x07;
-- 
2.17.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help