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