#include <linux/acpi.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/export.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/swab.h>
#include <linux/types.h>
#include <linux/units.h>
#include "i2c-designware-core.h"
static char *abort_sources[] = …;
static int dw_reg_read(void *context, unsigned int reg, unsigned int *val)
{ … }
static int dw_reg_write(void *context, unsigned int reg, unsigned int val)
{ … }
static int dw_reg_read_swab(void *context, unsigned int reg, unsigned int *val)
{ … }
static int dw_reg_write_swab(void *context, unsigned int reg, unsigned int val)
{ … }
static int dw_reg_read_word(void *context, unsigned int reg, unsigned int *val)
{ … }
static int dw_reg_write_word(void *context, unsigned int reg, unsigned int val)
{ … }
int i2c_dw_init_regmap(struct dw_i2c_dev *dev)
{ … }
static const u32 supported_speeds[] = …;
int i2c_dw_validate_speed(struct dw_i2c_dev *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
#ifdef CONFIG_ACPI
#include <linux/dmi.h>
static const struct dmi_system_id i2c_dw_no_acpi_params[] = …;
static void i2c_dw_acpi_params(struct device *device, char method[],
u16 *hcnt, u16 *lcnt, u32 *sda_hold)
{ … }
int i2c_dw_acpi_configure(struct device *device)
{ … }
EXPORT_SYMBOL_GPL(…);
static u32 i2c_dw_acpi_round_bus_speed(struct device *device)
{ … }
#else
static inline u32 i2c_dw_acpi_round_bus_speed(struct device *device) { return 0; }
#endif
void i2c_dw_adjust_bus_speed(struct dw_i2c_dev *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
u32 i2c_dw_scl_hcnt(u32 ic_clk, u32 tSYMBOL, u32 tf, int cond, int offset)
{ … }
u32 i2c_dw_scl_lcnt(u32 ic_clk, u32 tLOW, u32 tf, int offset)
{ … }
int i2c_dw_set_sda_hold(struct dw_i2c_dev *dev)
{ … }
void __i2c_dw_disable(struct dw_i2c_dev *dev)
{ … }
u32 i2c_dw_clk_rate(struct dw_i2c_dev *dev)
{ … }
int i2c_dw_prepare_clk(struct dw_i2c_dev *dev, bool prepare)
{ … }
EXPORT_SYMBOL_GPL(…);
int i2c_dw_acquire_lock(struct dw_i2c_dev *dev)
{ … }
void i2c_dw_release_lock(struct dw_i2c_dev *dev)
{ … }
int i2c_dw_wait_bus_not_busy(struct dw_i2c_dev *dev)
{ … }
int i2c_dw_handle_tx_abort(struct dw_i2c_dev *dev)
{ … }
int i2c_dw_set_fifo_size(struct dw_i2c_dev *dev)
{ … }
u32 i2c_dw_func(struct i2c_adapter *adap)
{ … }
void i2c_dw_disable(struct dw_i2c_dev *dev)
{ … }
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;