* [U-Boot] [PATCH] atmel_lcd: Allow contrast polarity to be either positive or negative
@ 2010-07-20 6:55 Alexander Stein
2010-09-25 13:26 ` Anatolij Gustschin
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Stein @ 2010-07-20 6:55 UTC (permalink / raw)
To: u-boot
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
---
drivers/video/atmel_lcdfb.c | 3 ++-
include/lcd.h | 1 +
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index db86763..c02ffd8 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -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);
diff --git a/include/lcd.h b/include/lcd.h
index cd9d49d..0e098d9 100644
--- a/include/lcd.h
+++ b/include/lcd.h
@@ -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 */
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-25 13:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-20 6:55 [U-Boot] [PATCH] atmel_lcd: Allow contrast polarity to be either positive or negative Alexander Stein
2010-09-25 13:26 ` Anatolij Gustschin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox