forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PATCH] powermac: More powermac backlight fixes
This patch fixes several problems: - The legacy backlight value might be set at interrupt time. Introduced a worker to prevent it from directly calling the backlight code. - via-pmu allows the backlight to be grabbed, in which case we need to prevent other kernel code from changing the brightness. - Don't send PMU requests in via-pmu-backlight when the machine is about to sleep or waking up. - More Kconfig fixes. Signed-off-by: Michael Hanselmann <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: "Antonino A. Daplas" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information
Michael Hanselmann
authored and
Linus Torvalds
committed
Jul 31, 2006
1 parent
994aad2
commit 4b75599
Showing
10 changed files
with
147 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,14 +45,11 @@ | |
#include <linux/pmu.h> | ||
|
||
#include <asm/machdep.h> | ||
#include <asm/backlight.h> | ||
#ifdef CONFIG_PPC_PMAC | ||
#include <asm/pmac_feature.h> | ||
#endif | ||
|
||
#ifdef CONFIG_PMAC_BACKLIGHT | ||
#include <asm/backlight.h> | ||
#endif | ||
|
||
MODULE_AUTHOR("Franz Sirl <[email protected]>"); | ||
|
||
#define KEYB_KEYREG 0 /* register # for key up/down data */ | ||
|
@@ -237,11 +234,6 @@ static struct adb_ids keyboard_ids; | |
static struct adb_ids mouse_ids; | ||
static struct adb_ids buttons_ids; | ||
|
||
#ifdef CONFIG_PMAC_BACKLIGHT | ||
/* Exported to via-pmu.c */ | ||
int disable_kernel_backlight = 0; | ||
#endif /* CONFIG_PMAC_BACKLIGHT */ | ||
|
||
/* Kind of keyboard, see Apple technote 1152 */ | ||
#define ADB_KEYBOARD_UNKNOWN 0 | ||
#define ADB_KEYBOARD_ANSI 0x0100 | ||
|
@@ -527,15 +519,15 @@ adbhid_buttons_input(unsigned char *data, int nb, struct pt_regs *regs, int auto | |
|
||
case 0xa: /* brightness decrease */ | ||
#ifdef CONFIG_PMAC_BACKLIGHT | ||
if (!disable_kernel_backlight && down) | ||
if (down) | ||
pmac_backlight_key_down(); | ||
#endif | ||
input_report_key(adbhid[id]->input, KEY_BRIGHTNESSDOWN, down); | ||
break; | ||
|
||
case 0x9: /* brightness increase */ | ||
#ifdef CONFIG_PMAC_BACKLIGHT | ||
if (!disable_kernel_backlight && down) | ||
if (down) | ||
pmac_backlight_key_up(); | ||
#endif | ||
input_report_key(adbhid[id]->input, KEY_BRIGHTNESSUP, down); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.