#include <linux/clk.h>
#include <linux/errno.h>
#include <linux/i2c.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>
#include <linux/time.h>
#define LPC24XX_I2CONSET …
#define LPC24XX_I2STAT …
#define LPC24XX_I2DAT …
#define LPC24XX_I2ADDR …
#define LPC24XX_I2SCLH …
#define LPC24XX_I2SCLL …
#define LPC24XX_I2CONCLR …
#define LPC24XX_AA …
#define LPC24XX_SI …
#define LPC24XX_STO …
#define LPC24XX_STA …
#define LPC24XX_I2EN …
#define LPC24XX_STO_AA …
#define LPC24XX_CLEAR_ALL …
#define I2C_STD_MODE_DUTY …
#define I2C_FAST_MODE_DUTY …
#define I2C_FAST_MODE_PLUS_DUTY …
enum { … };
struct lpc2k_i2c { … };
static void i2c_lpc2k_reset(struct lpc2k_i2c *i2c)
{ … }
static int i2c_lpc2k_clear_arb(struct lpc2k_i2c *i2c)
{ … }
static void i2c_lpc2k_pump_msg(struct lpc2k_i2c *i2c)
{ … }
static int lpc2k_process_msg(struct lpc2k_i2c *i2c, int msgidx)
{ … }
static int i2c_lpc2k_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
int msg_num)
{ … }
static irqreturn_t i2c_lpc2k_handler(int irq, void *dev_id)
{ … }
static u32 i2c_lpc2k_functionality(struct i2c_adapter *adap)
{ … }
static const struct i2c_algorithm i2c_lpc2k_algorithm = …;
static int i2c_lpc2k_probe(struct platform_device *pdev)
{ … }
static void i2c_lpc2k_remove(struct platform_device *dev)
{ … }
static int i2c_lpc2k_suspend(struct device *dev)
{ … }
static int i2c_lpc2k_resume(struct device *dev)
{ … }
static const struct dev_pm_ops i2c_lpc2k_dev_pm_ops = …;
static const struct of_device_id lpc2k_i2c_match[] = …;
MODULE_DEVICE_TABLE(of, lpc2k_i2c_match);
static struct platform_driver i2c_lpc2k_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;