mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Miao <eric.y.miao@gmail.com>
To: Richard Purdie <rpurdie@rpsys.net>, Pavel Machek <pavel@ucw.cz>
Cc: Andrew Morton <akpm@osdl.org>,
	lenz@cs.wisc.edu, kernel list <linux-kernel@vger.kernel.org>,
	Dirk@opfer-online.de, arminlitzel@web.de,
	Cyril Hrubis <metan@ucw.cz>,
	thommycheck@gmail.com,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	dbaryshkov@gmail.com, omegamoon@gmail.com, utx@penguin.cz
Subject: Re: spitz backlight: fix brightness limiting
Date: Thu, 22 Oct 2009 04:20:34 +0800	[thread overview]
Message-ID: <f17812d70910211320s29d3aaa5tad3206df1e99e03b@mail.gmail.com> (raw)
In-Reply-To: <20091019213751.GC1482@ucw.cz>

It's a little bit weird it's called 'limit_mask' when I first converted it
to a spi driver. There must be some reasons, Richard, you've got
any ideas?

On Tue, Oct 20, 2009 at 5:37 AM, Pavel Machek <pavel@ucw.cz> wrote:
>
> On spitz (& similar) machines, if battery is running low, backlight
> needs to be limited to lower step. Unfortunately, current code uses &=
> for limiting, turning backlight off completely for some backlight
> settings. Fix that.
>
> Signed-off-by: Pavel Machek <pavel@ucw.cz>
>
> --- linux-rc/drivers/video/backlight/corgi_lcd.c        2009-10-18 18:11:36.000000000 +0200
> +++ linux-rc/drivers/video/backlight/corgi_lcd.c        2009-10-16 02:10:13.000000000 +0200
> @@ -433,8 +434,9 @@
>
>        if (corgibl_flags & CORGIBL_SUSPENDED)
>                intensity = 0;
> -       if (corgibl_flags & CORGIBL_BATTLOW)
> -               intensity &= lcd->limit_mask;
> +
> +       if ((corgibl_flags & CORGIBL_BATTLOW) && intensity > lcd->limit_mask)
> +               intensity = lcd->limit_mask;
>
>        return corgi_bl_set_intensity(lcd, intensity);
>  }
>
>
> --
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
>

  reply	other threads:[~2009-10-21 20:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-19 21:37 Pavel Machek
2009-10-21 20:20 ` Eric Miao [this message]
2009-10-22  7:05   ` Pavel Machek
2009-10-22 13:58     ` Eric Miao
2009-10-22 22:43   ` Richard Purdie
2009-10-23  5:20     ` Pavel Machek
2009-10-23  7:56       ` Eric Miao

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=f17812d70910211320s29d3aaa5tad3206df1e99e03b@mail.gmail.com \
    --to=eric.y.miao@gmail.com \
    --cc=Dirk@opfer-online.de \
    --cc=akpm@osdl.org \
    --cc=arminlitzel@web.de \
    --cc=dbaryshkov@gmail.com \
    --cc=lenz@cs.wisc.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=metan@ucw.cz \
    --cc=omegamoon@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=rpurdie@rpsys.net \
    --cc=thommycheck@gmail.com \
    --cc=utx@penguin.cz \
    /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

all inboxes | Powered by JetHome®