Linux Audio

Check our new training course

Loading...
v6.8
 1/* SPDX-License-Identifier: GPL-2.0-only */
 2/*
 3 * Intel LPSS core support.
 4 *
 5 * Copyright (C) 2015, Intel Corporation
 6 *
 7 * Authors: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
 8 *          Mika Westerberg <mika.westerberg@linux.intel.com>
 
 
 
 
 9 */
10
11#ifndef __MFD_INTEL_LPSS_H
12#define __MFD_INTEL_LPSS_H
13
14#include <linux/pm.h>
15
16struct device;
17struct resource;
18struct software_node;
19
20struct intel_lpss_platform_info {
21	struct resource *mem;
22	bool ignore_resource_conflicts;
23	int irq;
24	unsigned long clk_rate;
25	const char *clk_con_id;
26	const struct software_node *swnode;
27};
28
29int intel_lpss_probe(struct device *dev,
30		     const struct intel_lpss_platform_info *info);
31void intel_lpss_remove(struct device *dev);
32
33extern const struct dev_pm_ops intel_lpss_pm_ops;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
35#endif /* __MFD_INTEL_LPSS_H */
v4.6
 
 1/*
 2 * Intel LPSS core support.
 3 *
 4 * Copyright (C) 2015, Intel Corporation
 5 *
 6 * Authors: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
 7 *          Mika Westerberg <mika.westerberg@linux.intel.com>
 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
 
 
17struct device;
18struct resource;
19struct property_set;
20
21struct intel_lpss_platform_info {
22	struct resource *mem;
 
23	int irq;
24	unsigned long clk_rate;
25	const char *clk_con_id;
26	struct property_set *pset;
27};
28
29int intel_lpss_probe(struct device *dev,
30		     const struct intel_lpss_platform_info *info);
31void intel_lpss_remove(struct device *dev);
32
33#ifdef CONFIG_PM
34int intel_lpss_prepare(struct device *dev);
35int intel_lpss_suspend(struct device *dev);
36int intel_lpss_resume(struct device *dev);
37
38#ifdef CONFIG_PM_SLEEP
39#define INTEL_LPSS_SLEEP_PM_OPS			\
40	.prepare = intel_lpss_prepare,		\
41	.suspend = intel_lpss_suspend,		\
42	.resume = intel_lpss_resume,		\
43	.freeze = intel_lpss_suspend,		\
44	.thaw = intel_lpss_resume,		\
45	.poweroff = intel_lpss_suspend,		\
46	.restore = intel_lpss_resume,
47#else
48#define INTEL_LPSS_SLEEP_PM_OPS
49#endif
50
51#define INTEL_LPSS_RUNTIME_PM_OPS		\
52	.runtime_suspend = intel_lpss_suspend,	\
53	.runtime_resume = intel_lpss_resume,
54
55#else /* !CONFIG_PM */
56#define INTEL_LPSS_SLEEP_PM_OPS
57#define INTEL_LPSS_RUNTIME_PM_OPS
58#endif /* CONFIG_PM */
59
60#define INTEL_LPSS_PM_OPS(name)			\
61const struct dev_pm_ops name = {		\
62	INTEL_LPSS_SLEEP_PM_OPS			\
63	INTEL_LPSS_RUNTIME_PM_OPS		\
64}
65
66#endif /* __MFD_INTEL_LPSS_H */