Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 
0003 #ifndef __CPUIDLE_PSCI_H
0004 #define __CPUIDLE_PSCI_H
0005 
0006 struct device;
0007 struct device_node;
0008 
0009 void psci_set_domain_state(u32 state);
0010 int psci_dt_parse_state_node(struct device_node *np, u32 *state);
0011 
0012 #ifdef CONFIG_ARM_PSCI_CPUIDLE_DOMAIN
0013 
0014 #include "dt_idle_genpd.h"
0015 
0016 static inline struct device *psci_dt_attach_cpu(int cpu)
0017 {
0018     return dt_idle_attach_cpu(cpu, "psci");
0019 }
0020 
0021 static inline void psci_dt_detach_cpu(struct device *dev)
0022 {
0023     dt_idle_detach_cpu(dev);
0024 }
0025 
0026 #else
0027 static inline struct device *psci_dt_attach_cpu(int cpu) { return NULL; }
0028 static inline void psci_dt_detach_cpu(struct device *dev) { }
0029 #endif
0030 
0031 #endif /* __CPUIDLE_PSCI_H */