aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorMichael Hanselmann <linux-kernel@hansmi.ch>2006-06-25 08:47:08 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 13:00:59 -0400
commit5474c120aafe78ca54bf272f7a01107c42da2b21 (patch)
treec1b002a27703ce92c816bfb9844752186e33d403 /arch/powerpc/kernel
parent17660bdd5c1f1a165273c1a59cb5b87670a81cc4 (diff)
[PATCH] Rewritten backlight infrastructure for portable Apple computers
This patch contains a total rewrite of the backlight infrastructure for portable Apple computers. Backward compatibility is retained. A sysfs interface allows userland to control the brightness with more steps than before. Userland is allowed to upload a brightness curve for different monitors, similar to Mac OS X. [akpm@osdl.org: add needed exports] Signed-off-by: Michael Hanselmann <linux-kernel@hansmi.ch> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/traps.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 91a6e04d974..52f5659534f 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -32,6 +32,7 @@
32#include <linux/delay.h> 32#include <linux/delay.h>
33#include <linux/kprobes.h> 33#include <linux/kprobes.h>
34#include <linux/kexec.h> 34#include <linux/kexec.h>
35#include <linux/backlight.h>
35 36
36#include <asm/kdebug.h> 37#include <asm/kdebug.h>
37#include <asm/pgtable.h> 38#include <asm/pgtable.h>
@@ -105,10 +106,18 @@ int die(const char *str, struct pt_regs *regs, long err)
105 spin_lock_irq(&die_lock); 106 spin_lock_irq(&die_lock);
106 bust_spinlocks(1); 107 bust_spinlocks(1);
107#ifdef CONFIG_PMAC_BACKLIGHT 108#ifdef CONFIG_PMAC_BACKLIGHT
108 if (machine_is(powermac)) { 109 mutex_lock(&pmac_backlight_mutex);
109 set_backlight_enable(1); 110 if (machine_is(powermac) && pmac_backlight) {
110 set_backlight_level(BACKLIGHT_MAX); 111 struct backlight_properties *props;
112
113 down(&pmac_backlight->sem);
114 props = pmac_backlight->props;
115 props->brightness = props->max_brightness;
116 props->power = FB_BLANK_UNBLANK;
117 props->update_status(pmac_backlight);
118 up(&pmac_backlight->sem);
111 } 119 }
120 mutex_unlock(&pmac_backlight_mutex);
112#endif 121#endif
113 printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter); 122 printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter);
114#ifdef CONFIG_PREEMPT 123#ifdef CONFIG_PREEMPT