Commit fd59f106 authored by Ben Gilbert's avatar Ben Gilbert Committed by Greg Kroah-Hartman

Staging: fbtft: Removed commented out/dead code

Deleted various commented out lines that have been replaced by write_reg()
Signed-off-by: default avatarBen Gilbert <gillie59978@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2fe9f8ca
...@@ -78,11 +78,11 @@ static int init_display(struct fbtft_par *par) ...@@ -78,11 +78,11 @@ static int init_display(struct fbtft_par *par)
mdelay(10); mdelay(10);
/* set startpoint */ /* set startpoint */
/* LCD_START_LINE | (pos & 0x3F) */
write_reg(par, LCD_START_LINE); write_reg(par, LCD_START_LINE);
/* select orientation BOTTOMVIEW */ /* select orientation BOTTOMVIEW */
write_reg(par, LCD_BOTTOMVIEW | 1); write_reg(par, LCD_BOTTOMVIEW | 1);
/* output mode select (turns display upside-down) */ /* output mode select (turns display upside-down) */
write_reg(par, LCD_SCAN_DIR | 0x00); write_reg(par, LCD_SCAN_DIR | 0x00);
...@@ -96,20 +96,14 @@ static int init_display(struct fbtft_par *par) ...@@ -96,20 +96,14 @@ static int init_display(struct fbtft_par *par)
write_reg(par, LCD_BIAS | 0); write_reg(par, LCD_BIAS | 0);
/* power control mode: all features on */ /* power control mode: all features on */
/* LCD_POWER_CONTROL | (val&0x07) */
write_reg(par, LCD_POWER_CONTROL | 0x07); write_reg(par, LCD_POWER_CONTROL | 0x07);
/* set voltage regulator R/R */ /* set voltage regulator R/R */
/* LCD_VOLTAGE | (val&0x07) */
write_reg(par, LCD_VOLTAGE | 0x07); write_reg(par, LCD_VOLTAGE | 0x07);
/* volume mode set */ /* volume mode set */
/* LCD_VOLUME_MODE,val&0x3f,LCD_NO_OP */
write_reg(par, LCD_VOLUME_MODE); write_reg(par, LCD_VOLUME_MODE);
/* LCD_VOLUME_MODE,val&0x3f,LCD_NO_OP */
write_reg(par, 0x09); write_reg(par, 0x09);
/* ???? */
/* LCD_VOLUME_MODE,val&0x3f,LCD_NO_OP */
write_reg(par, LCD_NO_OP); write_reg(par, LCD_NO_OP);
/* advanced program control */ /* advanced program control */
...@@ -125,17 +119,8 @@ static int init_display(struct fbtft_par *par) ...@@ -125,17 +119,8 @@ static int init_display(struct fbtft_par *par)
static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye) static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
{ {
/* goto address */ /* goto address */
/* LCD_PAGE_ADDRESS | ((page) & 0x1F),
(((col)+SHIFT_ADDR_NORMAL) & 0x0F),
LCD_COL_ADDRESS | ((((col)+SHIFT_ADDR_NORMAL)>>4) & 0x0F) */
write_reg(par, LCD_PAGE_ADDRESS); write_reg(par, LCD_PAGE_ADDRESS);
/* LCD_PAGE_ADDRESS | ((page) & 0x1F),
(((col)+SHIFT_ADDR_NORMAL) & 0x0F),
LCD_COL_ADDRESS | ((((col)+SHIFT_ADDR_NORMAL)>>4) & 0x0F) */
write_reg(par, 0x00); write_reg(par, 0x00);
/* LCD_PAGE_ADDRESS | ((page) & 0x1F),
(((col)+SHIFT_ADDR_NORMAL) & 0x0F),
LCD_COL_ADDRESS | ((((col)+SHIFT_ADDR_NORMAL)>>4) & 0x0F) */
write_reg(par, LCD_COL_ADDRESS); write_reg(par, LCD_COL_ADDRESS);
} }
...@@ -156,17 +141,9 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len) ...@@ -156,17 +141,9 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)
1 : 0) << i; 1 : 0) << i;
buf++; buf++;
} }
/* LCD_PAGE_ADDRESS | ((page) & 0x1F),
(((col)+SHIFT_ADDR_NORMAL) & 0x0F),
LCD_COL_ADDRESS | ((((col)+SHIFT_ADDR_NORMAL)>>4) & 0x0F) */
write_reg(par, LCD_PAGE_ADDRESS | (u8)y); write_reg(par, LCD_PAGE_ADDRESS | (u8)y);
/* LCD_PAGE_ADDRESS | ((page) & 0x1F),
(((col)+SHIFT_ADDR_NORMAL) & 0x0F),
LCD_COL_ADDRESS | ((((col)+SHIFT_ADDR_NORMAL)>>4) & 0x0F) */
write_reg(par, 0x00); write_reg(par, 0x00);
/* LCD_PAGE_ADDRESS | ((page) & 0x1F),
(((col)+SHIFT_ADDR_NORMAL) & 0x0F),
LCD_COL_ADDRESS | ((((col)+SHIFT_ADDR_NORMAL)>>4) & 0x0F) */
write_reg(par, LCD_COL_ADDRESS); write_reg(par, LCD_COL_ADDRESS);
gpio_set_value(par->gpio.dc, 1); gpio_set_value(par->gpio.dc, 1);
ret = par->fbtftops.write(par, par->txbuf.buf, WIDTH); ret = par->fbtftops.write(par, par->txbuf.buf, WIDTH);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment