]> git.sur5r.net Git - u-boot/commitdiff
atmel_lcd: Allow contrast polarity to be either positive or negative
authorAlexander Stein <alexander.stein@systec-electronic.com>
Tue, 20 Jul 2010 06:55:40 +0000 (08:55 +0200)
committerAnatolij Gustschin <agust@denx.de>
Sat, 25 Sep 2010 13:22:51 +0000 (15:22 +0200)
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
drivers/video/atmel_lcdfb.c
include/lcd.h

index db867638f6310e2491fa017426793edc1d715cf0..c02ffd8036394fdc6eacaadcb52c6226a6ca1ef0 100644 (file)
@@ -143,8 +143,9 @@ void lcd_ctrl_init(void *lcdbase)
 
        /* Set contrast */
        value = ATMEL_LCDC_PS_DIV8 |
-               ATMEL_LCDC_POL_POSITIVE |
                ATMEL_LCDC_ENA_PWMENABLE;
+       if (!panel_info.vl_cont_pol_low)
+               value |= ATMEL_LCDC_POL_POSITIVE;
        lcdc_writel(panel_info.mmio, ATMEL_LCDC_CONTRAST_CTR, value);
        lcdc_writel(panel_info.mmio, ATMEL_LCDC_CONTRAST_VAL, ATMEL_LCDC_CVAL_DEFAULT);
 
index cd9d49d3ae4f845a85a169f5ae53958201ca1e94..0e098d925ecb053e875cc5340aebe2b07d70765e 100644 (file)
@@ -167,6 +167,7 @@ typedef struct vidinfo {
        u_long vl_sync;         /* Horizontal / vertical sync */
        u_long vl_bpix;         /* Bits per pixel, 0 = 1, 1 = 2, 2 = 4, 3 = 8, 4 = 16 */
        u_long vl_tft;          /* 0 = passive, 1 = TFT */
+       u_long vl_cont_pol_low; /* contrast polarity is low */
 
        /* Horizontal control register. */
        u_long vl_hsync_len;    /* Length of horizontal sync */