aboutsummaryrefslogtreecommitdiff
path: root/drivers/cpuidle/dt_idle_genpd.h
blob: a95483d08a02a8594b378c9022232e26f9237cb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __DT_IDLE_GENPD
#define __DT_IDLE_GENPD

struct device_node;
struct generic_pm_domain;

#ifdef CONFIG_DT_IDLE_GENPD

void dt_idle_pd_free(struct generic_pm_domain *pd);

struct generic_pm_domain *dt_idle_pd_alloc(struct device_node *np,
			int (*parse_state)(struct device_node *, u32 *));

int dt_idle_pd_init_topology(struct device_node *np);

struct device *dt_idle_attach_cpu(int cpu, const char *name);

void dt_idle_detach_cpu(struct device *dev);

#else

static inline void dt_idle_pd_free(struct generic_pm_domain *pd)
{
}

static inline struct generic_pm_domain *dt_idle_pd_alloc(
			struct device_node *np,
			int (*parse_state)(struct device_node *, u32 *))
{
	return NULL;
}

static inline int dt_idle_pd_init_topology(struct device_node *np)
{
	return 0;
}

static inline struct device *dt_idle_attach_cpu(int cpu, const char *name)
{
	return NULL;
}

static inline void dt_idle_detach_cpu(struct device *dev)
{
}

#endif

#endif