Commit 9f8e0562 authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman
Browse files

staging: fbtft: Convert int arrays to s16



These arrays use -1, -2, and -3 as initiators for various types of
writes to initialize hardware.

No values are used that conflict with using these arrays as s16
instead of int and reducing overall data is good.

$ size drivers/staging/fbtft/built-in.o*
   text	   data	    bss	    dec	    hex	filename
 116120	  32872	   4152	 153144	  25638	drivers/staging/fbtft/built-in.o.new
 116104	  36344	   6200	 158648	  26bb8	drivers/staging/fbtft/built-in.o.old

Miscellaneous:

o Realign some of the arrays to make reading a bit easier

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d45f1a56
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@
#define WIDTH		320
#define HEIGHT		480

static int default_init_sequence[] = {
static s16 default_init_sequence[] = {
	/* SLP_OUT - Sleep out */
	-1, MIPI_DCS_EXIT_SLEEP_MODE,
	-2, 50,
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@
#define HEIGHT		480

/* this init sequence matches PiScreen */
static int default_init_sequence[] = {
static s16 default_init_sequence[] = {
	/* Interface Mode Control */
	-1, 0xb0, 0x0,
	-1, MIPI_DCS_EXIT_SLEEP_MODE,
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@

#define DRVNAME "fb_s6d02a1"

static int default_init_sequence[] = {
static s16 default_init_sequence[] = {

	-1, 0xf0, 0x5a, 0x5a,

+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
#define DEFAULT_GAMMA   "0F 1A 0F 18 2F 28 20 22 1F 1B 23 37 00 07 02 10\n" \
			"0F 1B 0F 17 33 2C 29 2E 30 30 39 3F 00 07 03 10"

static int default_init_sequence[] = {
static s16 default_init_sequence[] = {
	-1, MIPI_DCS_SOFT_RESET,
	-2, 150,                               /* delay */

+1 −1
Original line number Diff line number Diff line
@@ -660,7 +660,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
	unsigned int bpp = display->bpp;
	unsigned int fps = display->fps;
	int vmem_size, i;
	int *init_sequence = display->init_sequence;
	s16 *init_sequence = display->init_sequence;
	char *gamma = display->gamma;
	unsigned long *gamma_curves = NULL;

Loading