diff options
author | Dennis Menschel <menschel-d@posteo.de> | 2015-10-21 23:16:53 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-24 19:42:37 -0700 |
commit | 598af18afc6dd5753622b8e4c9a6cd185f4223a4 (patch) | |
tree | dfae13873bb8d5de90e82114d9020626e2e331e8 /drivers/staging/fbtft/fbtft_device.c | |
parent | 164e265b63db867b77d0f57ddf2324bbdaa151f3 (diff) | |
download | op-kernel-dev-598af18afc6dd5753622b8e4c9a6cd185f4223a4.zip op-kernel-dev-598af18afc6dd5753622b8e4c9a6cd185f4223a4.tar.gz |
staging: fbtft: use MIPI DCS for ST7789V and C-Berry28
This patch makes use of the standard MIPI Display Command Set to remove
redundant entries from the command enum of the ST7789V display controller
and also some of the magic constants found in the init sequence of the
C-Berry28 display.
Signed-off-by: Dennis Menschel <menschel-d@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fbtft/fbtft_device.c')
-rw-r--r-- | drivers/staging/fbtft/fbtft_device.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers/staging/fbtft/fbtft_device.c index 0e501d0..d7475d7 100644 --- a/drivers/staging/fbtft/fbtft_device.c +++ b/drivers/staging/fbtft/fbtft_device.c @@ -19,6 +19,7 @@ #include <linux/init.h> #include <linux/gpio.h> #include <linux/spi/spi.h> +#include <video/mipi_display.h> #include "fbtft.h" @@ -132,11 +133,11 @@ static void adafruit18_green_tab_set_addr_win(struct fbtft_par *par, static int cberry28_init_sequence[] = { /* turn off sleep mode */ - -1, 0x11, + -1, MIPI_DCS_EXIT_SLEEP_MODE, -2, 120, /* set pixel format to RGB-565 */ - -1, 0x3A, 0x05, + -1, MIPI_DCS_SET_PIXEL_FORMAT, MIPI_DCS_PIXEL_FMT_16BIT, -1, 0xB2, 0x0C, 0x0C, 0x00, 0x33, 0x33, @@ -174,7 +175,7 @@ static int cberry28_init_sequence[] = { */ -1, 0xD0, 0xA4, 0x61, - -1, 0x29, + -1, MIPI_DCS_SET_DISPLAY_ON, -3, }; |