#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/time.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/spinlock.h>
#define HSI2C_CTL …
#define HSI2C_FIFO_CTL …
#define HSI2C_TRAILIG_CTL …
#define HSI2C_CLK_CTL …
#define HSI2C_CLK_SLOT …
#define HSI2C_INT_ENABLE …
#define HSI2C_INT_STATUS …
#define HSI2C_ERR_STATUS …
#define HSI2C_FIFO_STATUS …
#define HSI2C_TX_DATA …
#define HSI2C_RX_DATA …
#define HSI2C_CONF …
#define HSI2C_AUTO_CONF …
#define HSI2C_TIMEOUT …
#define HSI2C_MANUAL_CMD …
#define HSI2C_TRANS_STATUS …
#define HSI2C_TIMING_HS1 …
#define HSI2C_TIMING_HS2 …
#define HSI2C_TIMING_HS3 …
#define HSI2C_TIMING_FS1 …
#define HSI2C_TIMING_FS2 …
#define HSI2C_TIMING_FS3 …
#define HSI2C_TIMING_SLA …
#define HSI2C_ADDR …
#define HSI2C_FUNC_MODE_I2C …
#define HSI2C_MASTER …
#define HSI2C_RXCHON …
#define HSI2C_TXCHON …
#define HSI2C_SW_RST …
#define HSI2C_RXFIFO_EN …
#define HSI2C_TXFIFO_EN …
#define HSI2C_RXFIFO_TRIGGER_LEVEL(x) …
#define HSI2C_TXFIFO_TRIGGER_LEVEL(x) …
#define HSI2C_TRAILING_COUNT …
#define HSI2C_INT_TX_ALMOSTEMPTY_EN …
#define HSI2C_INT_RX_ALMOSTFULL_EN …
#define HSI2C_INT_TRAILING_EN …
#define HSI2C_INT_TX_ALMOSTEMPTY …
#define HSI2C_INT_RX_ALMOSTFULL …
#define HSI2C_INT_TX_UNDERRUN …
#define HSI2C_INT_TX_OVERRUN …
#define HSI2C_INT_RX_UNDERRUN …
#define HSI2C_INT_RX_OVERRUN …
#define HSI2C_INT_TRAILING …
#define HSI2C_INT_I2C …
#define HSI2C_INT_TRANS_DONE …
#define HSI2C_INT_TRANS_ABORT …
#define HSI2C_INT_NO_DEV_ACK …
#define HSI2C_INT_NO_DEV …
#define HSI2C_INT_TIMEOUT …
#define HSI2C_INT_I2C_TRANS …
#define HSI2C_RX_FIFO_EMPTY …
#define HSI2C_RX_FIFO_FULL …
#define HSI2C_RX_FIFO_LVL(x) …
#define HSI2C_TX_FIFO_EMPTY …
#define HSI2C_TX_FIFO_FULL …
#define HSI2C_TX_FIFO_LVL(x) …
#define HSI2C_AUTO_MODE …
#define HSI2C_10BIT_ADDR_MODE …
#define HSI2C_HS_MODE …
#define HSI2C_READ_WRITE …
#define HSI2C_STOP_AFTER_TRANS …
#define HSI2C_MASTER_RUN …
#define HSI2C_TIMEOUT_EN …
#define HSI2C_TIMEOUT_MASK …
#define HSI2C_CMD_READ_DATA …
#define HSI2C_CMD_SEND_STOP …
#define HSI2C_MASTER_BUSY …
#define HSI2C_SLAVE_BUSY …
#define HSI2C_TIMEOUT_AUTO …
#define HSI2C_NO_DEV …
#define HSI2C_NO_DEV_ACK …
#define HSI2C_TRANS_ABORT …
#define HSI2C_TRANS_DONE …
#define HSI2C_MASTER_ST_MASK …
#define HSI2C_MASTER_ST_IDLE …
#define HSI2C_MASTER_ST_START …
#define HSI2C_MASTER_ST_RESTART …
#define HSI2C_MASTER_ST_STOP …
#define HSI2C_MASTER_ST_MASTER_ID …
#define HSI2C_MASTER_ST_ADDR0 …
#define HSI2C_MASTER_ST_ADDR1 …
#define HSI2C_MASTER_ST_ADDR2 …
#define HSI2C_MASTER_ST_ADDR_SR …
#define HSI2C_MASTER_ST_READ …
#define HSI2C_MASTER_ST_WRITE …
#define HSI2C_MASTER_ST_NO_ACK …
#define HSI2C_MASTER_ST_LOSE …
#define HSI2C_MASTER_ST_WAIT …
#define HSI2C_MASTER_ST_WAIT_CMD …
#define HSI2C_SLV_ADDR_SLV(x) …
#define HSI2C_SLV_ADDR_MAS(x) …
#define HSI2C_MASTER_ID(x) …
#define MASTER_ID(x) …
#define EXYNOS5_I2C_TIMEOUT …
enum i2c_type_exynos { … };
struct exynos5_i2c { … };
struct exynos_hsi2c_variant { … };
static const struct exynos_hsi2c_variant exynos5250_hsi2c_data = …;
static const struct exynos_hsi2c_variant exynos5260_hsi2c_data = …;
static const struct exynos_hsi2c_variant exynos7_hsi2c_data = …;
static const struct exynos_hsi2c_variant exynosautov9_hsi2c_data = …;
static const struct of_device_id exynos5_i2c_match[] = …;
MODULE_DEVICE_TABLE(of, exynos5_i2c_match);
static void exynos5_i2c_clr_pend_irq(struct exynos5_i2c *i2c)
{ … }
static int exynos5_i2c_set_timing(struct exynos5_i2c *i2c, bool hs_timings)
{ … }
static int exynos5_hsi2c_clock_setup(struct exynos5_i2c *i2c)
{ … }
static void exynos5_i2c_init(struct exynos5_i2c *i2c)
{ … }
static void exynos5_i2c_reset(struct exynos5_i2c *i2c)
{ … }
static irqreturn_t exynos5_i2c_irq(int irqno, void *dev_id)
{ … }
static int exynos5_i2c_wait_bus_idle(struct exynos5_i2c *i2c)
{ … }
static void exynos5_i2c_bus_recover(struct exynos5_i2c *i2c)
{ … }
static void exynos5_i2c_bus_check(struct exynos5_i2c *i2c)
{ … }
static void exynos5_i2c_message_start(struct exynos5_i2c *i2c, int stop)
{ … }
static bool exynos5_i2c_poll_irqs_timeout(struct exynos5_i2c *i2c,
unsigned long timeout)
{ … }
static int exynos5_i2c_xfer_msg(struct exynos5_i2c *i2c,
struct i2c_msg *msgs, int stop)
{ … }
static int exynos5_i2c_xfer(struct i2c_adapter *adap,
struct i2c_msg *msgs, int num)
{ … }
static int exynos5_i2c_xfer_atomic(struct i2c_adapter *adap,
struct i2c_msg *msgs, int num)
{ … }
static u32 exynos5_i2c_func(struct i2c_adapter *adap)
{ … }
static const struct i2c_algorithm exynos5_i2c_algorithm = …;
static int exynos5_i2c_probe(struct platform_device *pdev)
{ … }
static void exynos5_i2c_remove(struct platform_device *pdev)
{ … }
static int exynos5_i2c_suspend_noirq(struct device *dev)
{ … }
static int exynos5_i2c_resume_noirq(struct device *dev)
{ … }
static const struct dev_pm_ops exynos5_i2c_dev_pm_ops = …;
static struct platform_driver exynos5_i2c_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;