Re: [PATCH] apple-gmux: Add suspend/resume support for the backlight

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 10, 2012 at 09:49:48AM -0700, David Woodhouse wrote:
> 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?

Good point. I'll send an updated patch.

Seth

--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux