[PATCH 07/10] ARM chumby: enable backlight in platform data hook

Sascha Hauer s.hauer at pengutronix.de
Thu Jan 20 04:46:58 EST 2011


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 arch/arm/boards/chumby_falconwing/falconwing.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boards/chumby_falconwing/falconwing.c b/arch/arm/boards/chumby_falconwing/falconwing.c
index 966d99b..0979630 100644
--- a/arch/arm/boards/chumby_falconwing/falconwing.c
+++ b/arch/arm/boards/chumby_falconwing/falconwing.c
@@ -57,6 +57,22 @@ static struct device_d mci_dev = {
 	.platform_data = &mci_pdata,
 };
 
+#define GPIO_LCD_RESET		50
+#define GPIO_LCD_BACKLIGHT	60
+
+static void chumby_fb_enable(int enable)
+{
+	gpio_direction_output(GPIO_LCD_RESET, enable);
+
+	/* Give the display a chance to sync before we enable
+	 * the backlight to avoid flickering
+	 */
+	if (enable)
+		mdelay(100);
+
+	gpio_direction_output(GPIO_LCD_BACKLIGHT, enable);
+}
+
 static struct fb_videomode falconwing_vmode = {
 	/*
 	 * Nanovision NMA35QV65-B2-K01 (directly connected)
@@ -87,6 +103,7 @@ static struct imx_fb_videomode fb_mode = {
 	.mode_cnt = 1,
 	/* the NMA35 is a 24 bit display, but only 18 bits are connected */
 	.ld_intf_width = STMLCDIF_18BIT,
+	.enable = chumby_fb_enable,
 };
 
 static struct device_d ldcif_dev = {
-- 
1.7.2.3




More information about the barebox mailing list