ACPI: ibm-acpi: improve backlight power handling
PATCH 1/1 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 <[email protected]>
Acked-by Richard Purdie <[email protected]>
---
Len, I have added this to the for-upstream/acpi-test branch of git://repo.or.cz/linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git
for when you pull it.
drivers/acpi/ibm_acpi.c | 5 ++++- drivers/acpi/ibm_acpi.h | 1 + 2 files changed, 5 insertions(+), 1 deletions(-)
drivers/acpi/ibm_acpi.c +4 -1
@@ -1664,7 +1664,10 @@ static void brightness_exit(void)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 int brightness_get (struct backlight_device *bd)
drivers/acpi/ibm_acpi.h +1 -0
@@ -32,6 +32,7 @@#include <linux/proc_fs.h> #include <linux/backlight.h> +#include <linux/fb.h> #include <asm/uaccess.h> #include <linux/dmi.h>
Signature · 13 lines
1.5.0.1 -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
EWRONGLIST.
Sorry about this, it won't happen again.
Signature · 11 lines
"One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV