atmel_lcd: Allow contrast polarity to be either positive or negative

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
This commit is contained in:
Alexander Stein
2010-07-20 08:55:40 +02:00
committed by Anatolij Gustschin
parent 55b05237b9
commit cdfcedbf25
2 changed files with 3 additions and 1 deletions

View 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);