blob: 8cf5c37c3817c55af33ec1f5b5a24ebdf2a77f06 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * Routines for handling backlight control on PowerBooks
3 *
Paul Mackerras508c4022005-10-11 09:26:48 +10004 * For now, implementation resides in
Michael Hanselmann5474c122006-06-25 05:47:08 -07005 * arch/powerpc/platforms/powermac/backlight.c
Linus Torvalds1da177e2005-04-16 15:20:36 -07006 *
7 */
Paul Mackerras508c4022005-10-11 09:26:48 +10008#ifndef __ASM_POWERPC_BACKLIGHT_H
9#define __ASM_POWERPC_BACKLIGHT_H
Linus Torvalds1da177e2005-04-16 15:20:36 -070010#ifdef __KERNEL__
Linus Torvalds1da177e2005-04-16 15:20:36 -070011
Michael Hanselmann5474c122006-06-25 05:47:08 -070012#include <linux/fb.h>
13#include <linux/mutex.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070014
Michael Hanselmann5474c122006-06-25 05:47:08 -070015/* For locking instructions, see the implementation file */
16extern struct backlight_device *pmac_backlight;
17extern struct mutex pmac_backlight_mutex;
Linus Torvalds1da177e2005-04-16 15:20:36 -070018
Michael Hanselmann5474c122006-06-25 05:47:08 -070019extern int pmac_backlight_curve_lookup(struct fb_info *info, int value);
Linus Torvalds1da177e2005-04-16 15:20:36 -070020
Michael Hanselmann5474c122006-06-25 05:47:08 -070021extern int pmac_has_backlight_type(const char *type);
22
Michael Hanselmanne01af032006-07-10 04:44:45 -070023extern void pmac_backlight_key(int direction);
24static inline void pmac_backlight_key_up(void)
25{
26 pmac_backlight_key(0);
27}
28static inline void pmac_backlight_key_down(void)
29{
30 pmac_backlight_key(1);
31}
Michael Hanselmann5474c122006-06-25 05:47:08 -070032
Michael Hanselmann4b755992006-07-30 03:04:19 -070033extern void pmac_backlight_set_legacy_brightness_pmu(int brightness);
Michael Hanselmann5474c122006-06-25 05:47:08 -070034extern int pmac_backlight_set_legacy_brightness(int brightness);
35extern int pmac_backlight_get_legacy_brightness(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -070036
Michael Hanselmann4b755992006-07-30 03:04:19 -070037extern void pmac_backlight_enable(void);
38extern void pmac_backlight_disable(void);
39
Linus Torvalds1da177e2005-04-16 15:20:36 -070040#endif /* __KERNEL__ */
Paul Mackerras508c4022005-10-11 09:26:48 +100041#endif