2005-04-16 16:20:36 -06:00
|
|
|
/*
|
|
|
|
* Routines for handling backlight control on PowerBooks
|
|
|
|
*
|
2005-10-10 17:26:48 -06:00
|
|
|
* For now, implementation resides in
|
2006-06-25 06:47:08 -06:00
|
|
|
* arch/powerpc/platforms/powermac/backlight.c
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
*/
|
2005-10-10 17:26:48 -06:00
|
|
|
#ifndef __ASM_POWERPC_BACKLIGHT_H
|
|
|
|
#define __ASM_POWERPC_BACKLIGHT_H
|
2005-04-16 16:20:36 -06:00
|
|
|
#ifdef __KERNEL__
|
|
|
|
|
2006-06-25 06:47:08 -06:00
|
|
|
#include <linux/fb.h>
|
|
|
|
#include <linux/mutex.h>
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2006-06-25 06:47:08 -06:00
|
|
|
/* For locking instructions, see the implementation file */
|
|
|
|
extern struct backlight_device *pmac_backlight;
|
|
|
|
extern struct mutex pmac_backlight_mutex;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2006-06-25 06:47:08 -06:00
|
|
|
extern int pmac_backlight_curve_lookup(struct fb_info *info, int value);
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2006-06-25 06:47:08 -06:00
|
|
|
extern int pmac_has_backlight_type(const char *type);
|
|
|
|
|
2006-07-10 05:44:45 -06:00
|
|
|
extern void pmac_backlight_key(int direction);
|
|
|
|
static inline void pmac_backlight_key_up(void)
|
|
|
|
{
|
|
|
|
pmac_backlight_key(0);
|
|
|
|
}
|
|
|
|
static inline void pmac_backlight_key_down(void)
|
|
|
|
{
|
|
|
|
pmac_backlight_key(1);
|
|
|
|
}
|
2006-06-25 06:47:08 -06:00
|
|
|
|
2006-07-30 04:04:19 -06:00
|
|
|
extern void pmac_backlight_set_legacy_brightness_pmu(int brightness);
|
2006-06-25 06:47:08 -06:00
|
|
|
extern int pmac_backlight_set_legacy_brightness(int brightness);
|
|
|
|
extern int pmac_backlight_get_legacy_brightness(void);
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2006-07-30 04:04:19 -06:00
|
|
|
extern void pmac_backlight_enable(void);
|
|
|
|
extern void pmac_backlight_disable(void);
|
|
|
|
|
2005-04-16 16:20:36 -06:00
|
|
|
#endif /* __KERNEL__ */
|
2005-10-10 17:26:48 -06:00
|
|
|
#endif
|