From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: <linuxppc-dev@ozlabs.org>
Subject: [PATCH] [POWERPC] (testers ?) Fix sleep on some powerbooks
Date: Mon, 03 Mar 2008 17:27:46 +1100 [thread overview]
Message-ID: <20080303062831.6BD8EDDED8@ozlabs.org> (raw)
The PMU backlight code would kick in during sleep/resume even on
machines that use a different backlight method. This appears to
break sleep on my PowerBook, though I can't test that patch at
the moment as the machine died while I was bisecting.
So if anybody around has one of those latest revision PowerPC
PowerBooks, the one just before they went to Intel, and have a
problem with suspend/resume, please test this and let me know
if it helps.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
drivers/macintosh/via-pmu-backlight.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- linux-work.orig/drivers/macintosh/via-pmu-backlight.c 2008-03-03 17:24:44.000000000 +1100
+++ linux-work/drivers/macintosh/via-pmu-backlight.c 2008-03-03 17:25:12.000000000 +1100
@@ -17,7 +17,7 @@
static struct backlight_ops pmu_backlight_data;
static DEFINE_SPINLOCK(pmu_backlight_lock);
-static int sleeping;
+static int sleeping, uses_pmu_bl;
static u8 bl_curve[FB_BACKLIGHT_LEVELS];
static void pmu_backlight_init_curve(u8 off, u8 min, u8 max)
@@ -128,7 +128,7 @@ void pmu_backlight_set_sleep(int sleep)
spin_lock_irqsave(&pmu_backlight_lock, flags);
sleeping = sleep;
- if (pmac_backlight) {
+ if (pmac_backlight && uses_pmu_bl) {
if (sleep) {
struct adb_request req;
@@ -166,6 +166,7 @@ void __init pmu_backlight_init()
printk(KERN_ERR "PMU Backlight registration failed\n");
return;
}
+ uses_pmu_bl = 1;
bd->props.max_brightness = FB_BACKLIGHT_LEVELS - 1;
pmu_backlight_init_curve(0x7F, 0x46, 0x0E);
next reply other threads:[~2008-03-03 6:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-03 6:27 Benjamin Herrenschmidt [this message]
2008-03-04 16:15 ` [PATCH] [POWERPC] (testers ?) Fix sleep on some powerbooks Wolfgang Pfeiffer
2008-03-04 20:21 ` Gaudenz Steinlin
2008-03-04 21:28 ` Wolfgang Pfeiffer
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=20080303062831.6BD8EDDED8@ozlabs.org \
--to=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).