#include <linux/acpi.h>
#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/platform_data/clk-fch.h>
#include <linux/platform_device.h>
#include "internal.h"
struct apd_private_data;
struct apd_device_desc { … };
struct apd_private_data { … };
#if defined(CONFIG_X86_AMD_PLATFORM_DEVICE) || defined(CONFIG_ARM64)
#define APD_ADDR(desc) …
static int acpi_apd_setup(struct apd_private_data *pdata)
{ … }
#ifdef CONFIG_X86_AMD_PLATFORM_DEVICE
static int fch_misc_setup(struct apd_private_data *pdata)
{ … }
static const struct apd_device_desc cz_i2c_desc = …;
static const struct apd_device_desc wt_i2c_desc = …;
static const struct apd_device_desc wt_i3c_desc = …;
static struct property_entry uart_properties[] = …;
static const struct apd_device_desc cz_uart_desc = …;
static const struct apd_device_desc fch_misc_desc = …;
#endif
#ifdef CONFIG_ARM64
static const struct apd_device_desc xgene_i2c_desc = {
.setup = acpi_apd_setup,
.fixed_clk_rate = 100000000,
};
static const struct apd_device_desc vulcan_spi_desc = {
.setup = acpi_apd_setup,
.fixed_clk_rate = 133000000,
};
static const struct apd_device_desc hip07_i2c_desc = {
.setup = acpi_apd_setup,
.fixed_clk_rate = 200000000,
};
static const struct apd_device_desc hip08_i2c_desc = {
.setup = acpi_apd_setup,
.fixed_clk_rate = 250000000,
};
static const struct apd_device_desc hip08_lite_i2c_desc = {
.setup = acpi_apd_setup,
.fixed_clk_rate = 125000000,
};
static const struct apd_device_desc thunderx2_i2c_desc = {
.setup = acpi_apd_setup,
.fixed_clk_rate = 125000000,
};
static const struct apd_device_desc nxp_i2c_desc = {
.setup = acpi_apd_setup,
.fixed_clk_rate = 350000000,
};
static const struct apd_device_desc hip08_spi_desc = {
.setup = acpi_apd_setup,
.fixed_clk_rate = 250000000,
};
#endif
#endif
static int acpi_apd_create_device(struct acpi_device *adev,
const struct acpi_device_id *id)
{ … }
static const struct acpi_device_id acpi_apd_device_ids[] = …;
static struct acpi_scan_handler apd_handler = …;
void __init acpi_apd_init(void)
{ … }