#include <linux/acpi.h>
#include <linux/clk-provider.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/dmi.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/pm_runtime.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/reset.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/suspend.h>
#include <linux/units.h>
#include "i2c-designware-core.h"
static u32 i2c_dw_get_clk_rate_khz(struct dw_i2c_dev *dev)
{ … }
#ifdef CONFIG_ACPI
static const struct acpi_device_id dw_i2c_acpi_match[] = …;
MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match);
#endif
#ifdef CONFIG_OF
#define BT1_I2C_CTL …
#define BT1_I2C_CTL_ADDR_MASK …
#define BT1_I2C_CTL_WR …
#define BT1_I2C_CTL_GO …
#define BT1_I2C_DI …
#define BT1_I2C_DO …
static int bt1_i2c_read(void *context, unsigned int reg, unsigned int *val)
{ … }
static int bt1_i2c_write(void *context, unsigned int reg, unsigned int val)
{ … }
static const struct regmap_config bt1_i2c_cfg = …;
static int bt1_i2c_request_regs(struct dw_i2c_dev *dev)
{ … }
#define MSCC_ICPU_CFG_TWI_DELAY …
#define MSCC_ICPU_CFG_TWI_DELAY_ENABLE …
#define MSCC_ICPU_CFG_TWI_SPIKE_FILTER …
static int mscc_twi_set_sda_hold_time(struct dw_i2c_dev *dev)
{ … }
static int dw_i2c_of_configure(struct platform_device *pdev)
{ … }
static const struct of_device_id dw_i2c_of_match[] = …;
MODULE_DEVICE_TABLE(of, dw_i2c_of_match);
#else
static int bt1_i2c_request_regs(struct dw_i2c_dev *dev)
{
return -ENODEV;
}
static inline int dw_i2c_of_configure(struct platform_device *pdev)
{
return -ENODEV;
}
#endif
static int txgbe_i2c_request_regs(struct dw_i2c_dev *dev)
{ … }
static void dw_i2c_plat_pm_cleanup(struct dw_i2c_dev *dev)
{ … }
static int dw_i2c_plat_request_regs(struct dw_i2c_dev *dev)
{ … }
static const struct dmi_system_id dw_i2c_hwmon_class_dmi[] = …;
static const struct i2c_dw_semaphore_callbacks i2c_dw_semaphore_cb_table[] = …;
static int i2c_dw_probe_lock_support(struct dw_i2c_dev *dev)
{ … }
static void i2c_dw_remove_lock_support(struct dw_i2c_dev *dev)
{ … }
static int dw_i2c_plat_probe(struct platform_device *pdev)
{ … }
static void dw_i2c_plat_remove(struct platform_device *pdev)
{ … }
static int dw_i2c_plat_prepare(struct device *dev)
{ … }
static int dw_i2c_plat_runtime_suspend(struct device *dev)
{ … }
static int dw_i2c_plat_suspend(struct device *dev)
{ … }
static int dw_i2c_plat_runtime_resume(struct device *dev)
{ … }
static int dw_i2c_plat_resume(struct device *dev)
{ … }
static const struct dev_pm_ops dw_i2c_dev_pm_ops = …;
static const struct platform_device_id dw_i2c_platform_ids[] = …;
MODULE_DEVICE_TABLE(platform, dw_i2c_platform_ids);
static struct platform_driver dw_i2c_driver = …;
static int __init dw_i2c_init_driver(void)
{ … }
subsys_initcall(dw_i2c_init_driver);
static void __exit dw_i2c_exit_driver(void)
{ … }
module_exit(dw_i2c_exit_driver);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;