aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/fbtft/fbtft.h
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/fbtft.h
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/fbtft.h')
-rw-r--r--drivers/staging/fbtft/fbtft.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
index ac427baa464a..7fdd3b0851ef 100644
--- a/drivers/staging/fbtft/fbtft.h
+++ b/drivers/staging/fbtft/fbtft.h
@@ -27,7 +27,7 @@
*/
struct fbtft_gpio {
char name[FBTFT_GPIO_NAME_SIZE];
- unsigned int gpio;
+ struct gpio_desc *gpio;
};
struct fbtft_par;
@@ -134,7 +134,6 @@ struct fbtft_display {
*/
struct fbtft_platform_data {
struct fbtft_display display;
- const struct fbtft_gpio *gpios;
unsigned int rotate;
bool bgr;
unsigned int fps;
@@ -207,15 +206,15 @@ struct fbtft_par {
unsigned int dirty_lines_start;
unsigned int dirty_lines_end;
struct {
- int reset;
- int dc;
- int rd;
- int wr;
- int latch;
- int cs;
- int db[16];
- int led[16];
- int aux[16];
+ struct gpio_desc *reset;
+ struct gpio_desc *dc;
+ struct gpio_desc *rd;
+ struct gpio_desc *wr;
+ struct gpio_desc *latch;
+ struct gpio_desc *cs;
+ struct gpio_desc *db[16];
+ struct gpio_desc *led[16];
+ struct gpio_desc *aux[16];
} gpio;
const s16 *init_sequence;
struct {