summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>2007-03-08 05:28:15 -0300
committerLen Brown <len.brown@intel.com>2007-03-08 20:24:57 -0500
commitc9bf296b6467968ecb9d988e7ed754a19c2e63d9 (patch)
tree456f437ff2a68ce983de41fb3d2e218f9a7b9451
parent2bc808a8c4821a8ef4e3dc35b8fc577a9d2c6f0d (diff)
downloadblackbird-obmc-linux-c9bf296b6467968ecb9d988e7ed754a19c2e63d9.tar.gz
blackbird-obmc-linux-c9bf296b6467968ecb9d988e7ed754a19c2e63d9.zip
ACPI: ibm-acpi: improve backlight power handling
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 <hmh@hmh.eng.br> Acked-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--drivers/acpi/ibm_acpi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c
index e7309a668732..36901362fd24 100644
--- a/drivers/acpi/ibm_acpi.c
+++ b/drivers/acpi/ibm_acpi.c
@@ -86,6 +86,7 @@
#include <linux/proc_fs.h>
#include <linux/backlight.h>
+#include <linux/fb.h>
#include <asm/uaccess.h>
#include <linux/dmi.h>
@@ -1707,7 +1708,10 @@ 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->props.fb_blank == FB_BLANK_UNBLANK &&
+ bd->props.power == FB_BLANK_UNBLANK) ?
+ bd->props.brightness : 0);
}
static struct backlight_ops ibm_backlight_data = {
OpenPOWER on IntegriCloud