X86 platform drivers
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Seth Forshee <seth.forshee@canonical.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>,
	platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH] apple-gmux: Add suspend/resume support for the backlight
Date: Thu, 10 May 2012 09:49:48 -0700	[thread overview]
Message-ID: <1336668588.27520.179.camel@shinybook.infradead.org> (raw)
In-Reply-To: <20120510162320.GA32040@ubuntu-mba>

[-- Attachment #1: Type: text/plain, Size: 1252 bytes --]

On Thu, 2012-05-10 at 09:23 -0700, Seth Forshee wrote:
> On Thu, May 10, 2012 at 09:06:52AM -0700, David Woodhouse wrote:
> > On Thu, 2012-04-19 at 10:55 -0500, Seth Forshee wrote:
> > > --- a/drivers/platform/x86/apple-gmux.c
> > > +++ b/drivers/platform/x86/apple-gmux.c
> > > @@ -87,6 +87,9 @@ static int gmux_update_status(struct backlight_device *bd)
> > >         struct apple_gmux_data *gmux_data = bl_get_data(bd);
> > >         u32 brightness = bd->props.brightness;
> > >  
> > > +       if (bd->props.state & BL_CORE_SUSPENDED)
> > > +               brightness = 0;
> > > +
> > >         /*
> > >          * Older gmux versions require writing out lower bytes first then
> > >          * setting the upper byte to 0 to flush the values. Newer versions
> > 
> > Is this part necessary? It's about to be turned off *anyway*, and
> > turning it off sooner will achieve little other than to make it harder
> > to debug suspend failures, surely?
> 
> No, I suppose it isn't strictly necessary. I added it to avoid having
> the backlight turned off when the lid is closed and then turned back on
> while suspending.

That's achievable with

 if (bd->props.state & BL_CORE_SUSPENDED)
    return;

right?

-- 
dwmw2

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 6171 bytes --]

  reply	other threads:[~2012-05-10 16:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-19 15:55 [PATCH] apple-gmux: Add suspend/resume support for the backlight Seth Forshee
2012-05-03 19:36 ` Seth Forshee
2012-05-03 19:59   ` Matthew Garrett
2012-05-03 20:33     ` Matthew Garrett
2012-05-07 16:29       ` Seth Forshee
2012-05-10 16:06 ` David Woodhouse
2012-05-10 16:23   ` Seth Forshee
2012-05-10 16:49     ` David Woodhouse [this message]
2012-05-10 17:05       ` Seth Forshee

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=1336668588.27520.179.camel@shinybook.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=seth.forshee@canonical.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox