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)  * cpuidle.h - The internal header file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) #ifndef __DRIVER_CPUIDLE_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) #define __DRIVER_CPUIDLE_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) /* For internal use only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) extern char param_governor[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) extern struct cpuidle_governor *cpuidle_curr_governor;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) extern struct cpuidle_governor *cpuidle_prev_governor;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) extern struct list_head cpuidle_governors;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) extern struct list_head cpuidle_detected_devices;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) extern struct mutex cpuidle_lock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) extern spinlock_t cpuidle_driver_lock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) extern int cpuidle_disabled(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) extern int cpuidle_enter_state(struct cpuidle_device *dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 		struct cpuidle_driver *drv, int next_state);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) /* idle loop */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) extern void cpuidle_install_idle_handler(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) extern void cpuidle_uninstall_idle_handler(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) /* governors */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) extern struct cpuidle_governor *cpuidle_find_governor(const char *str);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) extern int cpuidle_switch_governor(struct cpuidle_governor *gov);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) /* sysfs */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) struct device;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) extern int cpuidle_add_interface(struct device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) extern void cpuidle_remove_interface(struct device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) extern int cpuidle_add_device_sysfs(struct cpuidle_device *device);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) extern void cpuidle_remove_device_sysfs(struct cpuidle_device *device);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) extern int cpuidle_add_sysfs(struct cpuidle_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) extern void cpuidle_remove_sysfs(struct cpuidle_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) #ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) bool cpuidle_state_is_coupled(struct cpuidle_driver *drv, int state);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) int cpuidle_coupled_state_verify(struct cpuidle_driver *drv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) int cpuidle_enter_state_coupled(struct cpuidle_device *dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) 		struct cpuidle_driver *drv, int next_state);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) int cpuidle_coupled_register_device(struct cpuidle_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) void cpuidle_coupled_unregister_device(struct cpuidle_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) static inline
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) bool cpuidle_state_is_coupled(struct cpuidle_driver *drv, int state)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) 	return false;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) static inline int cpuidle_coupled_state_verify(struct cpuidle_driver *drv)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) static inline int cpuidle_enter_state_coupled(struct cpuidle_device *dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) 		struct cpuidle_driver *drv, int next_state)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) 	return -1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) static inline int cpuidle_coupled_register_device(struct cpuidle_device *dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) static inline void cpuidle_coupled_unregister_device(struct cpuidle_device *dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) #endif /* __DRIVER_CPUIDLE_H */