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