#include <linux/clk.h>
#include <linux/completion.h>
#include <linux/device.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/sched.h>
#define I2C_OFS_IICACT0 …
#define I2C_OFS_IIC0 …
#define I2C_OFS_IICC0 …
#define I2C_OFS_SVA0 …
#define I2C_OFS_IICCL0 …
#define I2C_OFS_IICX0 …
#define I2C_OFS_IICS0 …
#define I2C_OFS_IICSE0 …
#define I2C_OFS_IICF0 …
#define I2C_BIT_IICE0 …
#define I2C_BIT_LREL0 …
#define I2C_BIT_WREL0 …
#define I2C_BIT_SPIE0 …
#define I2C_BIT_WTIM0 …
#define I2C_BIT_ACKE0 …
#define I2C_BIT_STT0 …
#define I2C_BIT_SPT0 …
#define I2C_BIT_SMC0 …
#define I2C_BIT_DFC0 …
#define I2C_BIT_MSTS0 …
#define I2C_BIT_ALD0 …
#define I2C_BIT_EXC0 …
#define I2C_BIT_COI0 …
#define I2C_BIT_TRC0 …
#define I2C_BIT_ACKD0 …
#define I2C_BIT_STD0 …
#define I2C_BIT_SPD0 …
#define I2C_BIT_STCF …
#define I2C_BIT_IICBSY …
#define I2C_BIT_STCEN …
#define I2C_BIT_IICRSV …
struct em_i2c_device { … };
static inline void em_clear_set_bit(struct em_i2c_device *priv, u8 clear, u8 set, u8 reg)
{ … }
static int em_i2c_wait_for_event(struct em_i2c_device *priv)
{ … }
static void em_i2c_stop(struct em_i2c_device *priv)
{ … }
static void em_i2c_reset(struct i2c_adapter *adap)
{ … }
static int __em_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msg,
int stop)
{ … }
static int em_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
int num)
{ … }
static bool em_i2c_slave_irq(struct em_i2c_device *priv)
{ … }
static irqreturn_t em_i2c_irq_handler(int this_irq, void *dev_id)
{ … }
static u32 em_i2c_func(struct i2c_adapter *adap)
{ … }
static int em_i2c_reg_slave(struct i2c_client *slave)
{ … }
static int em_i2c_unreg_slave(struct i2c_client *slave)
{ … }
static const struct i2c_algorithm em_i2c_algo = …;
static int em_i2c_probe(struct platform_device *pdev)
{ … }
static void em_i2c_remove(struct platform_device *dev)
{ … }
static const struct of_device_id em_i2c_ids[] = …;
static struct platform_driver em_i2c_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_DEVICE_TABLE(of, em_i2c_ids);