LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: Richard Purdie <rpurdie@rpsys.net>
Cc: Jiri Kosina <jikos@jikos.cz>, linux-kernel@vger.kernel.org
Subject: [PATCH] ACPI: ibm-acpi: improve backlight power handling
Date: Mon, 26 Feb 2007 13:12:03 -0300	[thread overview]
Message-ID: <20070226161203.GD2909@khazad-dum.debian.net> (raw)
In-Reply-To: <20070226152035.GB2909@khazad-dum.debian.net>

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>
Cc: Richard Purdie <rpurdie@rpsys.net>
---

 Status: waiting ACK from Richard Purdie <rpurdie@rpsys.net>

 drivers/acpi/ibm_acpi.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c
index e7309a6..cb5885e 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,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->props.fb_blank == FB_BLANK_UNBLANK)? 
+				bd->props.brightness : 0);
 }
 
 static struct backlight_ops ibm_backlight_data = {
-- 
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

  reply	other threads:[~2007-02-26 16:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-26  0:59 2.6.21-rc1 dims my LCD Jiri Kosina
2007-02-26 11:41 ` Richard Purdie
2007-02-26 12:35   ` Jiri Kosina
2007-02-26 14:21     ` Henrique de Moraes Holschuh
2007-02-26 14:49       ` Richard Purdie
2007-02-26 15:20         ` Henrique de Moraes Holschuh
2007-02-26 16:12           ` Henrique de Moraes Holschuh [this message]
2007-02-26 16:38             ` [PATCH] ACPI: ibm-acpi: improve backlight power handling Richard Purdie
2007-02-26 18:12               ` Henrique de Moraes Holschuh
2007-02-26 18:26                 ` [PATCH] ACPI: ibm-acpi: improve backlight power handling (v2) Henrique de Moraes Holschuh
2007-02-26 21:25                   ` Jiri Kosina
2007-02-26 21:42                     ` Richard Purdie
2007-02-26 21:46                       ` Henrique de Moraes Holschuh
2007-02-26 21:53                   ` Richard Purdie
2007-02-26 17:21             ` [PATCH] ACPI: ibm-acpi: improve backlight power handling Jiri Kosina
2007-02-26 18:17               ` Henrique de Moraes Holschuh
2007-02-26 15:24         ` 2.6.21-rc1 dims my LCD Jiri Kosina
2007-02-26 15:43           ` Richard Purdie
2007-02-26 17:13             ` [Linux-fbdev-devel] " Antonino A. Daplas
2007-02-26 16:03           ` Henrique de Moraes Holschuh
2007-02-26 17:01             ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070226161203.GD2909@khazad-dum.debian.net \
    --to=hmh@hmh.eng.br \
    --cc=jikos@jikos.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    --subject='Re: [PATCH] ACPI: ibm-acpi: improve backlight power handling' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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