2 * Intel LPSS core support.
4 * Copyright (C) 2015, Intel Corporation
6 * Authors: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
7 * Mika Westerberg <mika.westerberg@linux.intel.com>
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.
14 #ifndef __MFD_INTEL_LPSS_H
15 #define __MFD_INTEL_LPSS_H
20 struct intel_lpss_platform_info {
23 unsigned long clk_rate;
24 const char *clk_con_id;
27 int intel_lpss_probe(struct device *dev,
28 const struct intel_lpss_platform_info *info);
29 void intel_lpss_remove(struct device *dev);
32 int intel_lpss_prepare(struct device *dev);
33 int intel_lpss_suspend(struct device *dev);
34 int intel_lpss_resume(struct device *dev);
36 #ifdef CONFIG_PM_SLEEP
37 #define INTEL_LPSS_SLEEP_PM_OPS \
38 .prepare = intel_lpss_prepare, \
39 .suspend = intel_lpss_suspend, \
40 .resume = intel_lpss_resume, \
41 .freeze = intel_lpss_suspend, \
42 .thaw = intel_lpss_resume, \
43 .poweroff = intel_lpss_suspend, \
44 .restore = intel_lpss_resume,
46 #define INTEL_LPSS_SLEEP_PM_OPS
49 #define INTEL_LPSS_RUNTIME_PM_OPS \
50 .runtime_suspend = intel_lpss_suspend, \
51 .runtime_resume = intel_lpss_resume,
53 #else /* !CONFIG_PM */
54 #define INTEL_LPSS_SLEEP_PM_OPS
55 #define INTEL_LPSS_RUNTIME_PM_OPS
56 #endif /* CONFIG_PM */
58 #define INTEL_LPSS_PM_OPS(name) \
59 const struct dev_pm_ops name = { \
60 INTEL_LPSS_SLEEP_PM_OPS \
61 INTEL_LPSS_RUNTIME_PM_OPS \
64 #endif /* __MFD_INTEL_LPSS_H */