1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef __DT_IDLE_GENPD 3 #define __DT_IDLE_GENPD 4 5 struct device_node; 6 struct generic_pm_domain; 7 8 #ifdef CONFIG_DT_IDLE_GENPD 9 10 void dt_idle_pd_free(struct generic_pm_domain *pd); 11 12 struct generic_pm_domain *dt_idle_pd_alloc(struct device_node *np, 13 int (*parse_state)(struct device_node *, u32 *)); 14 15 int dt_idle_pd_init_topology(struct device_node *np); 16 17 int dt_idle_pd_remove_topology(struct device_node *np); 18 19 struct device *dt_idle_attach_cpu(int cpu, const char *name); 20 21 void dt_idle_detach_cpu(struct device *dev); 22 23 #else 24 dt_idle_pd_free(struct generic_pm_domain * pd)25static inline void dt_idle_pd_free(struct generic_pm_domain *pd) 26 { 27 } 28 dt_idle_pd_alloc(struct device_node * np,int (* parse_state)(struct device_node *,u32 *))29static inline struct generic_pm_domain *dt_idle_pd_alloc( 30 struct device_node *np, 31 int (*parse_state)(struct device_node *, u32 *)) 32 { 33 return NULL; 34 } 35 dt_idle_pd_init_topology(struct device_node * np)36static inline int dt_idle_pd_init_topology(struct device_node *np) 37 { 38 return 0; 39 } 40 dt_idle_pd_remove_topology(struct device_node * np)41static inline int dt_idle_pd_remove_topology(struct device_node *np) 42 { 43 return 0; 44 } 45 dt_idle_attach_cpu(int cpu,const char * name)46static inline struct device *dt_idle_attach_cpu(int cpu, const char *name) 47 { 48 return NULL; 49 } 50 dt_idle_detach_cpu(struct device * dev)51static inline void dt_idle_detach_cpu(struct device *dev) 52 { 53 } 54 55 #endif 56 57 #endif 58