blob: 4c264c74760f9fa05c7bcc8cd5fb442cba0ee3b9 [file] [log] [blame]
Kuninori Morimoto8f45b112012-07-05 01:24:46 -07001/*
2 * Copyright (C) 2012 Renesas Solutions Corp.
3 *
4 * Kuninori Morimoto <morimoto.kuninori@renesas.com>
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10#ifndef PM_RMOBILE_H
11#define PM_RMOBILE_H
12
13#include <linux/pm_domain.h>
14
15struct platform_device;
16
17struct rmobile_pm_domain {
18 struct generic_pm_domain genpd;
19 struct dev_power_governor *gov;
20 int (*suspend)(void);
21 void (*resume)(void);
22 unsigned int bit_shift;
23 bool no_debug;
24};
25
26static inline
27struct rmobile_pm_domain *to_rmobile_pd(struct generic_pm_domain *d)
28{
29 return container_of(d, struct rmobile_pm_domain, genpd);
30}
31
32#ifdef CONFIG_PM
33extern void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd);
Rafael J. Wysocki0d09f452012-08-07 01:10:22 +020034extern void rmobile_init_domains(struct rmobile_pm_domain domains[], int num);
Rafael J. Wysocki8bdd9462012-08-07 01:07:01 +020035extern void rmobile_add_device_to_domain(const char *domain_name,
Kuninori Morimoto8f45b112012-07-05 01:24:46 -070036 struct platform_device *pdev);
Kuninori Morimoto8f45b112012-07-05 01:24:46 -070037#else
38#define rmobile_init_pm_domain(pd) do { } while (0)
Rafael J. Wysocki0d09f452012-08-07 01:10:22 +020039#define rmobile_init_domains(domains, num) do { } while (0)
Rafael J. Wysocki8bdd9462012-08-07 01:07:01 +020040#define rmobile_add_device_to_domain(name, pdev) do { } while (0)
Kuninori Morimoto8f45b112012-07-05 01:24:46 -070041#endif /* CONFIG_PM */
42
43#endif /* PM_RMOBILE_H */