Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3)  * Routines for handling backlight control on PowerBooks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5)  * For now, implementation resides in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6)  * arch/powerpc/platforms/powermac/backlight.c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) #ifndef __ASM_POWERPC_BACKLIGHT_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #define __ASM_POWERPC_BACKLIGHT_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #ifdef __KERNEL__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #include <linux/fb.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #include <linux/mutex.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) /* For locking instructions, see the implementation file */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) extern struct backlight_device *pmac_backlight;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) extern struct mutex pmac_backlight_mutex;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) extern int pmac_backlight_curve_lookup(struct fb_info *info, int value);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) extern int pmac_has_backlight_type(const char *type);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) extern void pmac_backlight_key(int direction);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) static inline void pmac_backlight_key_up(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 	pmac_backlight_key(0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) static inline void pmac_backlight_key_down(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 	pmac_backlight_key(1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) extern void pmac_backlight_set_legacy_brightness_pmu(int brightness);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) extern int pmac_backlight_set_legacy_brightness(int brightness);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) extern int pmac_backlight_get_legacy_brightness(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) extern void pmac_backlight_enable(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) extern void pmac_backlight_disable(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) #endif /* __KERNEL__ */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) #endif