From: marek.vasut@gmail.com (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] backlight: Fix blanking for L4F00242T03 LCD
Date: Sat, 5 Jun 2010 03:25:46 +0200 [thread overview]
Message-ID: <201006050325.47060.marek.vasut@gmail.com> (raw)
In-Reply-To: <1275636583.3210.37.camel@realization>
Dne P? 4. ?ervna 2010 09:29:43 Alberto Panizzo napsal(a):
> On ven, 2010-06-04 at 07:52 +0200, Marek Vasut wrote:
> > The LCD was turned on if the variable power was > 0, but that was
> > incorrect. The LCD has to be turned on in every case but POWERDOWN.
> >
> > Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
>
> Ack
>
> > ---
> >
> > drivers/video/backlight/l4f00242t03.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/video/backlight/l4f00242t03.c
> > b/drivers/video/backlight/l4f00242t03.c index 9093ef0..ac20b2e 100644
> > --- a/drivers/video/backlight/l4f00242t03.c
> > +++ b/drivers/video/backlight/l4f00242t03.c
> > @@ -78,7 +78,7 @@ static int l4f00242t03_lcd_power_set(struct lcd_device
> > *ld, int power)
> >
> > const u16 slpin = 0x10;
> > const u16 disoff = 0x28;
> >
> > - if (power) {
> > + if (power < FB_BLANK_POWERDOWN) {
> >
> > if (priv->lcd_on)
> >
> > return 0;
>
> lcd.h states:
> struct lcd_ops {
> /* Get the LCD panel power status (0: full on, 1..3: controller
> power on, flat panel power off, 4: full off), see FB_BLANK_XXX */
> int (*get_power)(struct lcd_device *);
> /* Enable or disable power to the LCD (0: on; 4: off, see FB_BLANK_XXX)
*/
> int (*set_power)(struct lcd_device *, int power);
>
> AFAIK the gray area between FB_BLANK_NORMAL and FB_BLANK_HSYNC_SUSPEND
> can be chosen as needs.
>
> Why not:
>
> + #define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL)
>
> ...
>
> - if (power) {
> + if (POWER_IS_ON(power)) {
> if (priv->lcd_on)
> return 0;
>
> So with FB_BLANK_NORMAL the lcd is active and on -> low latencies
> in re-enabling the video out, but for !POWER_IS_ON(power) we will send
> the lcd to standby.
>
> It have to be implemented for power == FB_BLANK_POWERDOWN to turn off the
> regulators of the lcd.
>
> What do you think about?
Thanks! I sent a new (better) version. If you want credit in it, tell me how
should I add you one ;-)
>
> Regards,
next prev parent reply other threads:[~2010-06-05 1:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-04 5:52 [PATCH 1/2] backlight: Fix blanking for LMS283GF05 LCD Marek Vasut
2010-06-04 5:52 ` [PATCH 2/2] backlight: Fix blanking for L4F00242T03 LCD Marek Vasut
2010-06-04 7:29 ` Alberto Panizzo
2010-06-05 1:25 ` Marek Vasut [this message]
2010-06-05 9:22 ` Alberto Panizzo
2010-06-05 9:46 ` Marek Vasut
-- strict thread matches above, loose matches on Subject: below --
2010-06-05 1:25 [PATCH 1/2] backlight: Fix blanking for LMS283GF05 LCD Marek Vasut
2010-06-05 1:25 ` [PATCH 2/2] backlight: Fix blanking for L4F00242T03 LCD Marek Vasut
2010-06-05 9:25 ` Alberto Panizzo
2010-06-05 9:47 ` Marek Vasut
2010-06-05 9:50 [PATCH 1/2] backlight: Fix blanking for LMS283GF05 LCD Marek Vasut
2010-06-05 9:50 ` [PATCH 2/2] backlight: Fix blanking for L4F00242T03 LCD Marek Vasut
2010-11-05 10:48 ` Alberto Panizzo
2010-11-05 11:09 ` Richard Purdie
2010-11-05 11:20 ` Alberto Panizzo
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=201006050325.47060.marek.vasut@gmail.com \
--to=marek.vasut@gmail.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).