Re: [PATCH] ACPI: ibm-acpi: improve backlight power handling (v2)

2007-02-26 Thread Henrique de Moraes Holschuh
On Mon, 26 Feb 2007, Richard Purdie wrote: > We want to blank (set to 0) if either fb_blank or power isn't set to > FB_BLANK_UNBLANK. This is the same as setting to brightness if both > fb_blank and power are set to FB_BLANK_UNBLANK. This is what the above > expression does. Is that an ACK, then?

Re: [PATCH] ACPI: ibm-acpi: improve backlight power handling (v2)

2007-02-26 Thread Richard Purdie
On Mon, 2007-02-26 at 15:26 -0300, Henrique de Moraes Holschuh wrote: > Improve the backlight code to emulate as much as possible the power > management events, as we are unable to really power on or power off the > backlight. > > Signed-off-by: Henrique de Moraes Holschuh <[EMAIL PROTECTED]> Ack

Re: [PATCH] ACPI: ibm-acpi: improve backlight power handling (v2)

2007-02-26 Thread Richard Purdie
On Mon, 2007-02-26 at 22:25 +0100, Jiri Kosina wrote: > On Mon, 26 Feb 2007, Henrique de Moraes Holschuh wrote: > > > static int brightness_update_status(struct backlight_device *bd) > > { > > - return brightness_set(bd->props.brightness); > > + return brightness_set( > > + (bd->pr

Re: [PATCH] ACPI: ibm-acpi: improve backlight power handling (v2)

2007-02-26 Thread Jiri Kosina
On Mon, 26 Feb 2007, Henrique de Moraes Holschuh wrote: > static int brightness_update_status(struct backlight_device *bd) > { > - return brightness_set(bd->props.brightness); > + return brightness_set( > + (bd->props.fb_blank == FB_BLANK_UNBLANK && > + bd->props

Re: [PATCH] ACPI: ibm-acpi: improve backlight power handling

2007-02-26 Thread Henrique de Moraes Holschuh
On Mon, 26 Feb 2007, Jiri Kosina wrote: > On Mon, 26 Feb 2007, Henrique de Moraes Holschuh wrote: > > Improve the backlight code to emulate as much as possible the power > > management events, as we are unable to really power on or power off the > > backlight. > > This still easily leads to confus

Re: [PATCH] ACPI: ibm-acpi: improve backlight power handling

2007-02-26 Thread Henrique de Moraes Holschuh
On Mon, 26 Feb 2007, Richard Purdie wrote: > On Mon, 2007-02-26 at 13:12 -0300, Henrique de Moraes Holschuh wrote: > > @@ -1707,7 +1708,8 @@ static int brightness_write(char *buf) > > > > static int brightness_update_status(struct backlight_device *bd) > > { > > - return brightness_set(bd->pr

Re: [PATCH] ACPI: ibm-acpi: improve backlight power handling

2007-02-26 Thread Jiri Kosina
On Mon, 26 Feb 2007, Henrique de Moraes Holschuh wrote: > Improve the backlight code to emulate as much as possible the power > management events, as we are unable to really power on or power off the > backlight. This still easily leads to confusing behavior, doesn't it? As there are power-relat

Re: [PATCH] ACPI: ibm-acpi: improve backlight power handling

2007-02-26 Thread Richard Purdie
On Mon, 2007-02-26 at 13:12 -0300, Henrique de Moraes Holschuh wrote: > @@ -1707,7 +1708,8 @@ static int brightness_write(char *buf) > > static int brightness_update_status(struct backlight_device *bd) > { > - return brightness_set(bd->props.brightness); > + return brightness_set((bd->p