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