All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Semwal, Sumit" <sumit.semwal@ti.com>
To: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: linux-omap@vger.kernel.org, tony@atomide.com, tomi.valkeinen@nokia.com
Subject: Re: [PATCH-V2] OMAP3EVM: Made backlight GPIO default state to off
Date: Tue, 25 Jan 2011 08:04:36 +0530	[thread overview]
Message-ID: <AANLkTi=d-MDTv3_u7O2WKvD597od6pefqpW5O+kdXgPv@mail.gmail.com> (raw)
In-Reply-To: <1295896947-30475-1-git-send-email-hvaibhav@ti.com>

Vaibhav,

On Tue, Jan 25, 2011 at 12:52 AM, Vaibhav Hiremath <hvaibhav@ti.com> wrote:
> 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>
> ---
> Changes from V1 -
>        - Added check for return value
>
>  arch/arm/mach-omap2/board-omap3evm.c |   15 +++++++++++++--
>  1 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
> index 7119380..a888a7d 100644
> --- a/arch/arm/mach-omap2/board-omap3evm.c
> +++ b/arch/arm/mach-omap2/board-omap3evm.c
> @@ -411,6 +411,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;
> @@ -426,8 +428,17 @@ 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)
> +               printk(KERN_ERR "failed to get lcd_bkl gpio\n");
So even if the gpio_request fails, this code prints an error and continues?
> +
> +       if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2)
> +               r = gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
> +       else
> +               r = gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
> +
> +       if (r)
> +               printk(KERN_ERR "failed to set direction of lcd_bkl gpio\n");
>
>        /* gpio + 7 == DVI Enable */
>        gpio_request(gpio + 7, "EN_DVI");
> --
> 1.6.2.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-01-25  2:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-24 19:22 [PATCH-V2] OMAP3EVM: Made backlight GPIO default state to off Vaibhav Hiremath
2011-01-25  2:34 ` Semwal, Sumit [this message]
2011-01-25  4:48   ` Hiremath, Vaibhav
2011-01-25  4:53     ` Varadarajan, Charulatha
2011-01-25  5:20       ` Hiremath, Vaibhav
2011-01-25  6:26         ` Varadarajan, Charulatha

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='AANLkTi=d-MDTv3_u7O2WKvD597od6pefqpW5O+kdXgPv@mail.gmail.com' \
    --to=sumit.semwal@ti.com \
    --cc=hvaibhav@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=tomi.valkeinen@nokia.com \
    --cc=tony@atomide.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.