From: hvaibhav@ti.com (Vaibhav Hiremath)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/5] OMAP3EVM: Made backlight GPIO default state to off
Date: Tue, 25 Jan 2011 23:07:40 +0530 [thread overview]
Message-ID: <1295977061-11086-5-git-send-email-hvaibhav@ti.com> (raw)
In-Reply-To: <1295977061-11086-1-git-send-email-hvaibhav@ti.com>
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>
---
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 0d235bc..2a2efa9 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -444,6 +444,8 @@ static struct platform_device leds_gpio = {
static int omap3evm_twl_gpio_setup(struct device *dev,
unsigned gpio, unsigned ngpio)
{
+ int r;
+
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
omap_mux_init_gpio(63, OMAP_PIN_INPUT);
mmc[0].gpio_cd = gpio + 0;
@@ -459,8 +461,12 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
*/
/* TWL4030_GPIO_MAX + 0 == ledA, LCD Backlight control */
- gpio_request(gpio + TWL4030_GPIO_MAX, "EN_LCD_BKL");
- gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+ r = gpio_request(gpio + TWL4030_GPIO_MAX, "EN_LCD_BKL");
+ if (!r)
+ r = gpio_direction_output(gpio + TWL4030_GPIO_MAX,
+ (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) ? 1 : 0);
+ if (r)
+ printk(KERN_ERR "failed to get/set lcd_bkl gpio\n");
/* gpio + 7 == DVI Enable */
gpio_request(gpio + 7, "EN_DVI");
--
1.6.2.4
next prev parent reply other threads:[~2011-01-25 17:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-25 17:37 [PATCH 0/5] OMAP3EVM: Board bug fixes/enhancements Vaibhav Hiremath
2011-01-25 17:37 ` [PATCH 1/5] OMAP:board-omap3evm: Change TWL related gpio API's to gpio*_cansleep Vaibhav Hiremath
2011-01-28 7:56 ` Varadarajan, Charulatha
2011-01-25 17:37 ` [PATCH 2/5] OMAP3EVM: Add vio regulator supply required for ads7846 TSC driver Vaibhav Hiremath
2011-01-25 17:37 ` [PATCH 3/5] AM/DM37x: DSS mux configuration for >Rev-B processor cards Vaibhav Hiremath
2011-01-25 17:37 ` Vaibhav Hiremath [this message]
2011-01-25 17:37 ` [PATCH 5/5] OMAP3EVM: Set TSC wakeup option in pad config Vaibhav Hiremath
2011-01-27 18:42 ` Kevin Hilman
2011-02-17 22:19 ` Tony Lindgren
2011-02-22 6:01 ` Hiremath, Vaibhav
2011-01-27 18:41 ` [PATCH 0/5] OMAP3EVM: Board bug fixes/enhancements Kevin Hilman
2011-01-27 18:46 ` Hiremath, Vaibhav
2011-01-27 20:05 ` Kevin Hilman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1295977061-11086-5-git-send-email-hvaibhav@ti.com \
--to=hvaibhav@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).