mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 14:06:48 +07:00
e15ad2154b
If the boot firmware does not support ACPI we need a way to pass device configuration information to the drivers. The unified device properties API already supports passing platform data via properties so let's take advantage of that and allow probe drivers to pass set of properties to the host controller driver. In order to do that we need to be able to modify the MFD cell corresponding the host controller, so make the core driver to take copy of the cell instead of using it directly. Then we can assign info->pset to the resulting copy of a cell and let the MFD core to assign that to the resulting device. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
67 lines
1.6 KiB
C
67 lines
1.6 KiB
C
/*
|
|
* Intel LPSS core support.
|
|
*
|
|
* Copyright (C) 2015, Intel Corporation
|
|
*
|
|
* Authors: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
|
* Mika Westerberg <mika.westerberg@linux.intel.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
|
|
#ifndef __MFD_INTEL_LPSS_H
|
|
#define __MFD_INTEL_LPSS_H
|
|
|
|
struct device;
|
|
struct resource;
|
|
struct property_set;
|
|
|
|
struct intel_lpss_platform_info {
|
|
struct resource *mem;
|
|
int irq;
|
|
unsigned long clk_rate;
|
|
const char *clk_con_id;
|
|
struct property_set *pset;
|
|
};
|
|
|
|
int intel_lpss_probe(struct device *dev,
|
|
const struct intel_lpss_platform_info *info);
|
|
void intel_lpss_remove(struct device *dev);
|
|
|
|
#ifdef CONFIG_PM
|
|
int intel_lpss_prepare(struct device *dev);
|
|
int intel_lpss_suspend(struct device *dev);
|
|
int intel_lpss_resume(struct device *dev);
|
|
|
|
#ifdef CONFIG_PM_SLEEP
|
|
#define INTEL_LPSS_SLEEP_PM_OPS \
|
|
.prepare = intel_lpss_prepare, \
|
|
.suspend = intel_lpss_suspend, \
|
|
.resume = intel_lpss_resume, \
|
|
.freeze = intel_lpss_suspend, \
|
|
.thaw = intel_lpss_resume, \
|
|
.poweroff = intel_lpss_suspend, \
|
|
.restore = intel_lpss_resume,
|
|
#else
|
|
#define INTEL_LPSS_SLEEP_PM_OPS
|
|
#endif
|
|
|
|
#define INTEL_LPSS_RUNTIME_PM_OPS \
|
|
.runtime_suspend = intel_lpss_suspend, \
|
|
.runtime_resume = intel_lpss_resume,
|
|
|
|
#else /* !CONFIG_PM */
|
|
#define INTEL_LPSS_SLEEP_PM_OPS
|
|
#define INTEL_LPSS_RUNTIME_PM_OPS
|
|
#endif /* CONFIG_PM */
|
|
|
|
#define INTEL_LPSS_PM_OPS(name) \
|
|
const struct dev_pm_ops name = { \
|
|
INTEL_LPSS_SLEEP_PM_OPS \
|
|
INTEL_LPSS_RUNTIME_PM_OPS \
|
|
}
|
|
|
|
#endif /* __MFD_INTEL_LPSS_H */
|