diff options
author | Vaibhav Hiremath <hvaibhav@ti.com> | 2011-01-25 12:37:40 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-02-17 17:18:02 -0500 |
commit | 42fc8cab020c4d848a969b7c0a80b591c35bb263 (patch) | |
tree | 63f2b772ebe570e5d867f919cc13a6524bf05ef9 /arch/arm/mach-omap2/board-omap3evm.c | |
parent | 904c545c22dc4926e73c5c869efed0ca6a778bda (diff) |
OMAP3EVM: Made backlight GPIO default state to off
If you choose default output to DVI, the LCD backlight used to
stay on, since panel->disable function never gets called.
So, during init put backlight GPIO to off state and the driver
code will decide which output to enable.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3evm.c')
-rw-r--r-- | arch/arm/mach-omap2/board-omap3evm.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 36dac55b235c..4f2574c35ddf 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -456,6 +456,8 @@ static struct platform_device leds_gpio = { | |||
456 | static int omap3evm_twl_gpio_setup(struct device *dev, | 456 | static int omap3evm_twl_gpio_setup(struct device *dev, |
457 | unsigned gpio, unsigned ngpio) | 457 | unsigned gpio, unsigned ngpio) |
458 | { | 458 | { |
459 | int r; | ||
460 | |||
459 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ | 461 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ |
460 | omap_mux_init_gpio(63, OMAP_PIN_INPUT); | 462 | omap_mux_init_gpio(63, OMAP_PIN_INPUT); |
461 | mmc[0].gpio_cd = gpio + 0; | 463 | mmc[0].gpio_cd = gpio + 0; |
@@ -471,8 +473,12 @@ static int omap3evm_twl_gpio_setup(struct device *dev, | |||
471 | */ | 473 | */ |
472 | 474 | ||
473 | /* TWL4030_GPIO_MAX + 0 == ledA, LCD Backlight control */ | 475 | /* TWL4030_GPIO_MAX + 0 == ledA, LCD Backlight control */ |
474 | gpio_request(gpio + TWL4030_GPIO_MAX, "EN_LCD_BKL"); | 476 | r = gpio_request(gpio + TWL4030_GPIO_MAX, "EN_LCD_BKL"); |
475 | gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); | 477 | if (!r) |
478 | r = gpio_direction_output(gpio + TWL4030_GPIO_MAX, | ||
479 | (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) ? 1 : 0); | ||
480 | if (r) | ||
481 | printk(KERN_ERR "failed to get/set lcd_bkl gpio\n"); | ||
476 | 482 | ||
477 | /* gpio + 7 == DVI Enable */ | 483 | /* gpio + 7 == DVI Enable */ |
478 | gpio_request(gpio + 7, "EN_DVI"); | 484 | gpio_request(gpio + 7, "EN_DVI"); |