arm: am33xx: add GPIO backlight control hookup to LCD FB driver
authorManjunathappa, Prakash <prakash.pm@ti.com>
Tue, 10 Jan 2012 11:08:10 +0000 (16:38 +0530)
committerVaibhav Hiremath <hvaibhav@ti.com>
Mon, 23 Jan 2012 19:14:46 +0000 (00:44 +0530)
Patch adds hookup to toggle GPIO backlight from da8xx-fb LCD frame
buffer driver.

Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
arch/arm/mach-omap2/board-am335xevm.c

index a3bcca5d49b9ceed49de6ac203217a2d8662a875..5b510a01db3a25e2629d07521ffa892ad15a8793 100644 (file)
@@ -140,10 +140,13 @@ static struct lcd_ctrl_config lcd_cfg = {
        .raster_order           = 0,
 };
 
+static void am335x_gpio_bl_ctrl(int val);
+
 struct da8xx_lcdc_platform_data TFC_S9700RTWV35TR_01B_pdata = {
        .manu_name              = "ThreeFive",
        .controller_data        = &lcd_cfg,
        .type                   = "TFC_S9700RTWV35TR_01B",
+       .panel_power_ctrl       = am335x_gpio_bl_ctrl,
 };
 
 #include "common.h"
@@ -845,6 +848,12 @@ static void enable_ecap0(int evm_id, int profile)
        backlight_enable = true;
 }
 
+static void am335x_gpio_bl_ctrl(int val)
+{
+       /* lcd backlight */
+       gpio_set_value(AM335X_LCD_BL_PIN, val);
+}
+
 static int __init ecap0_init(void)
 {
        int status = 0;