linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI: ibm-acpi: improve backlight power handling
@ 2007-02-27  1:01 Henrique de Moraes Holschuh
  0 siblings, 0 replies; 59+ messages in thread
From: Henrique de Moraes Holschuh @ 2007-02-27  1:01 UTC (permalink / raw)
  To: Len Brown; +Cc: ibm-acpi-devel, linux-acpi

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>
---

 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(-)

diff --git a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c
index dd36be0..6573d01 100644
--- a/drivers/acpi/ibm_acpi.c
+++ b/drivers/acpi/ibm_acpi.c
@@ -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)
diff --git a/drivers/acpi/ibm_acpi.h b/drivers/acpi/ibm_acpi.h
index 4d0387a..b63c014 100644
--- a/drivers/acpi/ibm_acpi.h
+++ b/drivers/acpi/ibm_acpi.h
@@ -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>
-- 
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

^ permalink raw reply related	[flat|nested] 59+ messages in thread

end of thread, other threads:[~2007-03-20 14:44 UTC | newest]

Thread overview: 59+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <Pine.LNX.4.64.0702272105220.12485@woody.linux-foundation.org>
2007-03-05  1:50 ` [2/6] 2.6.21-rc2: known regressions Adrian Bunk
2007-03-07 11:09   ` Jeff Garzik
2007-03-07 16:10     ` Linus Torvalds
2007-03-08 12:03     ` Ash Milsted
2007-03-08 12:31   ` Michael S. Tsirkin
2007-03-08 15:11     ` Jeff Chua
2007-03-08 18:01     ` Linus Torvalds
2007-03-08 19:06       ` Ingo Molnar
2007-03-08 19:10         ` Ingo Molnar
2007-03-08 19:47         ` Michael S. Tsirkin
2007-03-08 20:10           ` Ingo Molnar
2007-03-08 19:25       ` Ingo Molnar
2007-03-08 23:07         ` Ingo Molnar
2007-03-08 23:12           ` Ingo Molnar
2007-03-08 23:28             ` Ingo Molnar
2007-03-08 23:49           ` Linus Torvalds
2007-03-09 10:56             ` Ingo Molnar
2007-03-09 18:00               ` Linus Torvalds
2007-03-09 11:19             ` Pavel Machek
2007-03-18 16:07               ` Ingo Molnar
2007-03-18 16:40                 ` [linux-pm] " Jim Gettys
2007-03-19 20:33                   ` Bill Davidsen
2007-03-19 22:08                     ` Jim Gettys
2007-03-20 14:44                       ` Bill Davidsen
2007-03-09 17:48             ` Johannes Stezenbach
2007-03-09 23:35               ` Pavel Machek
2007-03-10  9:01                 ` Ingo Molnar
2007-03-10 11:43                   ` Stefan Seyfried
2007-03-10 13:53                     ` Johannes Stezenbach
2007-03-10 15:18                     ` Ingo Molnar
2007-03-10 22:08                       ` Pavel Machek
2007-03-11  8:20                         ` Ingo Molnar
2007-03-12  6:34                           ` Stefan Seyfried
2007-03-10 22:04                   ` s2ram (was Re: [2/6] 2.6.21-rc2: known regressions) Pavel Machek
2007-03-08 19:46       ` [2/6] 2.6.21-rc2: known regressions Michael S. Tsirkin
2007-03-08 19:57       ` Michael S. Tsirkin
2007-03-05  1:50 ` [3/6] " Adrian Bunk
2007-03-05  3:58   ` Michal Jaegermann
2007-03-06 17:08   ` Alan Cox
2007-03-07 11:12   ` Jeff Garzik
2007-03-10  1:09     ` Mathieu Bérard
2007-03-10  4:11       ` and try remove another quirk on this computers " Sergio Monteiro Basto
2007-03-10  5:41         ` Linus Torvalds
2007-03-11  4:32           ` Sergio Monteiro Basto
2007-03-12 11:37       ` Tejun Heo
2007-03-13 12:31         ` Mathieu Bérard
2007-03-13 12:41           ` Tejun Heo
2007-03-13 20:56             ` Mathieu Bérard
2007-03-14  6:07               ` Tejun Heo
2007-03-05  1:50 ` [4/6] " Adrian Bunk
2007-03-05 10:35   ` Antonino A. Daplas
2007-03-08 23:28     ` Len Brown
2007-03-05 12:21   ` Richard Purdie
2007-03-08  7:43     ` [GIT PULL] ibm-acpi 2.6.21-rc3 regression fixes Henrique de Moraes Holschuh
2007-03-08  8:28       ` [PATCH] ACPI: ibm-acpi: fix initial status of backlight device Henrique de Moraes Holschuh
2007-03-09  1:23         ` Len Brown
2007-03-08  8:28       ` [PATCH] ACPI: ibm-acpi: improve backlight power handling Henrique de Moraes Holschuh
2007-03-09  1:25         ` Len Brown
2007-02-27  1:01 Henrique de Moraes Holschuh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).