Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef __DT_IDLE_GENPD
0003 #define __DT_IDLE_GENPD
0004 
0005 struct device_node;
0006 struct generic_pm_domain;
0007 
0008 #ifdef CONFIG_DT_IDLE_GENPD
0009 
0010 void dt_idle_pd_free(struct generic_pm_domain *pd);
0011 
0012 struct generic_pm_domain *dt_idle_pd_alloc(struct device_node *np,
0013             int (*parse_state)(struct device_node *, u32 *));
0014 
0015 int dt_idle_pd_init_topology(struct device_node *np);
0016 
0017 struct device *dt_idle_attach_cpu(int cpu, const char *name);
0018 
0019 void dt_idle_detach_cpu(struct device *dev);
0020 
0021 #else
0022 
0023 static inline void dt_idle_pd_free(struct generic_pm_domain *pd)
0024 {
0025 }
0026 
0027 static inline struct generic_pm_domain *dt_idle_pd_alloc(
0028             struct device_node *np,
0029             int (*parse_state)(struct device_node *, u32 *))
0030 {
0031     return NULL;
0032 }
0033 
0034 static inline int dt_idle_pd_init_topology(struct device_node *np)
0035 {
0036     return 0;
0037 }
0038 
0039 static inline struct device *dt_idle_attach_cpu(int cpu, const char *name)
0040 {
0041     return NULL;
0042 }
0043 
0044 static inline void dt_idle_detach_cpu(struct device *dev)
0045 {
0046 }
0047 
0048 #endif
0049 
0050 #endif