blob: d8e925e84c27af3d400f6f972d4ffe24dcf0c54b [file] [log] [blame]
Ulf Hanssona5e04542019-10-28 16:32:23 +01001/* SPDX-License-Identifier: GPL-2.0 */
2
3#ifndef __CPUIDLE_PSCI_H
4#define __CPUIDLE_PSCI_H
5
Ulf Hansson166bf832020-07-07 14:58:02 +02006struct device;
Ulf Hanssona65a3972019-10-10 12:01:48 +02007struct device_node;
8
9void psci_set_domain_state(u32 state);
Ulf Hansson166bf832020-07-07 14:58:02 +020010int psci_dt_parse_state_node(struct device_node *np, u32 *state);
Ulf Hanssona65a3972019-10-10 12:01:48 +020011
Ulf Hansson03175612020-07-07 14:58:00 +020012#ifdef CONFIG_ARM_PSCI_CPUIDLE_DOMAIN
Ulf Hansson166bf832020-07-07 14:58:02 +020013struct device *psci_dt_attach_cpu(int cpu);
14void psci_dt_detach_cpu(struct device *dev);
Ulf Hanssona5e04542019-10-28 16:32:23 +010015#else
Ulf Hansson166bf832020-07-07 14:58:02 +020016static inline struct device *psci_dt_attach_cpu(int cpu) { return NULL; }
17static inline void psci_dt_detach_cpu(struct device *dev) { }
Ulf Hanssona5e04542019-10-28 16:32:23 +010018#endif
19
20#endif /* __CPUIDLE_PSCI_H */