Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Routines for handling backlight control on PowerBooks |
| 3 | * |
Paul Mackerras | 508c402 | 2005-10-11 09:26:48 +1000 | [diff] [blame] | 4 | * For now, implementation resides in |
Michael Hanselmann | 5474c12 | 2006-06-25 05:47:08 -0700 | [diff] [blame] | 5 | * arch/powerpc/platforms/powermac/backlight.c |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | * |
| 7 | */ |
Paul Mackerras | 508c402 | 2005-10-11 09:26:48 +1000 | [diff] [blame] | 8 | #ifndef __ASM_POWERPC_BACKLIGHT_H |
| 9 | #define __ASM_POWERPC_BACKLIGHT_H |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | #ifdef __KERNEL__ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | |
Michael Hanselmann | 5474c12 | 2006-06-25 05:47:08 -0700 | [diff] [blame] | 12 | #include <linux/fb.h> |
| 13 | #include <linux/mutex.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | |
Michael Hanselmann | 5474c12 | 2006-06-25 05:47:08 -0700 | [diff] [blame] | 15 | /* For locking instructions, see the implementation file */ |
| 16 | extern struct backlight_device *pmac_backlight; |
| 17 | extern struct mutex pmac_backlight_mutex; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | |
Michael Hanselmann | 5474c12 | 2006-06-25 05:47:08 -0700 | [diff] [blame] | 19 | extern int pmac_backlight_curve_lookup(struct fb_info *info, int value); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | |
Michael Hanselmann | 5474c12 | 2006-06-25 05:47:08 -0700 | [diff] [blame] | 21 | extern int pmac_has_backlight_type(const char *type); |
| 22 | |
Michael Hanselmann | e01af03 | 2006-07-10 04:44:45 -0700 | [diff] [blame] | 23 | extern void pmac_backlight_key(int direction); |
| 24 | static inline void pmac_backlight_key_up(void) |
| 25 | { |
| 26 | pmac_backlight_key(0); |
| 27 | } |
| 28 | static inline void pmac_backlight_key_down(void) |
| 29 | { |
| 30 | pmac_backlight_key(1); |
| 31 | } |
Michael Hanselmann | 5474c12 | 2006-06-25 05:47:08 -0700 | [diff] [blame] | 32 | |
Michael Hanselmann | 4b75599 | 2006-07-30 03:04:19 -0700 | [diff] [blame] | 33 | extern void pmac_backlight_set_legacy_brightness_pmu(int brightness); |
Michael Hanselmann | 5474c12 | 2006-06-25 05:47:08 -0700 | [diff] [blame] | 34 | extern int pmac_backlight_set_legacy_brightness(int brightness); |
| 35 | extern int pmac_backlight_get_legacy_brightness(void); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | |
Michael Hanselmann | 4b75599 | 2006-07-30 03:04:19 -0700 | [diff] [blame] | 37 | extern void pmac_backlight_enable(void); |
| 38 | extern void pmac_backlight_disable(void); |
| 39 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | #endif /* __KERNEL__ */ |
Paul Mackerras | 508c402 | 2005-10-11 09:26:48 +1000 | [diff] [blame] | 41 | #endif |