Deleted various commented out lines that have been replaced by write_reg()

Signed-off-by: Ben Gilbert <gillie59...@gmail.com>
---
 drivers/staging/fbtft/fb_uc1701.c | 27 ++-------------------------
 1 file changed, 2 insertions(+), 25 deletions(-)

diff --git a/drivers/staging/fbtft/fb_uc1701.c 
b/drivers/staging/fbtft/fb_uc1701.c
index 212908e..b78045f 100644
--- a/drivers/staging/fbtft/fb_uc1701.c
+++ b/drivers/staging/fbtft/fb_uc1701.c
@@ -78,11 +78,11 @@ static int init_display(struct fbtft_par *par)
        mdelay(10);
 
        /* set startpoint */
-       /* LCD_START_LINE | (pos & 0x3F) */
        write_reg(par, LCD_START_LINE);
 
        /* select orientation BOTTOMVIEW */
        write_reg(par, LCD_BOTTOMVIEW | 1);
+
        /* output mode select (turns display upside-down) */
        write_reg(par, LCD_SCAN_DIR | 0x00);
 
@@ -96,20 +96,14 @@ static int init_display(struct fbtft_par *par)
        write_reg(par, LCD_BIAS | 0);
 
        /* power control mode: all features on */
-       /* LCD_POWER_CONTROL | (val&0x07) */
        write_reg(par, LCD_POWER_CONTROL | 0x07);
 
        /* set voltage regulator R/R */
-       /* LCD_VOLTAGE | (val&0x07) */
        write_reg(par, LCD_VOLTAGE | 0x07);
 
        /* volume mode set */
-       /* LCD_VOLUME_MODE,val&0x3f,LCD_NO_OP */
        write_reg(par, LCD_VOLUME_MODE);
-       /* LCD_VOLUME_MODE,val&0x3f,LCD_NO_OP */
        write_reg(par, 0x09);
-       /* ???? */
-       /* LCD_VOLUME_MODE,val&0x3f,LCD_NO_OP */
        write_reg(par, LCD_NO_OP);
 
        /* advanced program control */
@@ -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)
 {
        /* 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);
-       /* LCD_PAGE_ADDRESS | ((page) & 0x1F),
-        (((col)+SHIFT_ADDR_NORMAL) & 0x0F),
-         LCD_COL_ADDRESS | ((((col)+SHIFT_ADDR_NORMAL)>>4) & 0x0F) */
        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);
 }
 
@@ -156,17 +141,9 @@ static int write_vmem(struct fbtft_par *par, size_t 
offset, size_t len)
                                         1 : 0) << i;
                        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);
-               /* LCD_PAGE_ADDRESS | ((page) & 0x1F),
-                (((col)+SHIFT_ADDR_NORMAL) & 0x0F),
-                 LCD_COL_ADDRESS | ((((col)+SHIFT_ADDR_NORMAL)>>4) & 0x0F) */
                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);
                gpio_set_value(par->gpio.dc, 1);
                ret = par->fbtftops.write(par, par->txbuf.buf, WIDTH);
-- 
1.9.1

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to