]>
Commit | Line | Data |
---|---|---|
4b45efe8 AS |
1 | /* |
2 | * Intel LPSS core support. | |
3 | * | |
4 | * Copyright (C) 2015, Intel Corporation | |
5 | * | |
6 | * Authors: Andy Shevchenko <[email protected]> | |
7 | * Mika Westerberg <[email protected]> | |
8 | * | |
9 | * This program is free software; you can redistribute it and/or modify | |
10 | * it under the terms of the GNU General Public License version 2 as | |
11 | * published by the Free Software Foundation. | |
12 | */ | |
13 | ||
14 | #ifndef __MFD_INTEL_LPSS_H | |
15 | #define __MFD_INTEL_LPSS_H | |
16 | ||
17 | struct device; | |
18 | struct resource; | |
f4d05266 | 19 | struct property_entry; |
4b45efe8 AS |
20 | |
21 | struct intel_lpss_platform_info { | |
22 | struct resource *mem; | |
23 | int irq; | |
24 | unsigned long clk_rate; | |
25 | const char *clk_con_id; | |
f4d05266 | 26 | struct property_entry *properties; |
4b45efe8 AS |
27 | }; |
28 | ||
29 | int intel_lpss_probe(struct device *dev, | |
30 | const struct intel_lpss_platform_info *info); | |
31 | void intel_lpss_remove(struct device *dev); | |
32 | ||
33 | #ifdef CONFIG_PM | |
34 | int intel_lpss_prepare(struct device *dev); | |
35 | int intel_lpss_suspend(struct device *dev); | |
36 | int intel_lpss_resume(struct device *dev); | |
37 | ||
38 | #ifdef CONFIG_PM_SLEEP | |
39 | #define INTEL_LPSS_SLEEP_PM_OPS \ | |
40 | .prepare = intel_lpss_prepare, \ | |
e00952c7 | 41 | SET_LATE_SYSTEM_SLEEP_PM_OPS(intel_lpss_suspend, intel_lpss_resume) |
47b91923 AS |
42 | #else |
43 | #define INTEL_LPSS_SLEEP_PM_OPS | |
4b45efe8 AS |
44 | #endif |
45 | ||
46 | #define INTEL_LPSS_RUNTIME_PM_OPS \ | |
47 | .runtime_suspend = intel_lpss_suspend, \ | |
48 | .runtime_resume = intel_lpss_resume, | |
49 | ||
50 | #else /* !CONFIG_PM */ | |
51 | #define INTEL_LPSS_SLEEP_PM_OPS | |
52 | #define INTEL_LPSS_RUNTIME_PM_OPS | |
53 | #endif /* CONFIG_PM */ | |
54 | ||
55 | #define INTEL_LPSS_PM_OPS(name) \ | |
56 | const struct dev_pm_ops name = { \ | |
57 | INTEL_LPSS_SLEEP_PM_OPS \ | |
58 | INTEL_LPSS_RUNTIME_PM_OPS \ | |
59 | } | |
60 | ||
61 | #endif /* __MFD_INTEL_LPSS_H */ |