#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/jiffies.h>
#include <linux/errno.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/i2c-algo-pca.h>
#include <linux/platform_data/i2c-pca-platform.h>
#include <linux/gpio/consumer.h>
#include <linux/io.h>
#include <linux/of.h>
#include <asm/irq.h>
struct i2c_pca_pf_data { … };
static int i2c_pca_pf_readbyte8(void *pd, int reg)
{ … }
static int i2c_pca_pf_readbyte16(void *pd, int reg)
{ … }
static int i2c_pca_pf_readbyte32(void *pd, int reg)
{ … }
static void i2c_pca_pf_writebyte8(void *pd, int reg, int val)
{ … }
static void i2c_pca_pf_writebyte16(void *pd, int reg, int val)
{ … }
static void i2c_pca_pf_writebyte32(void *pd, int reg, int val)
{ … }
static int i2c_pca_pf_waitforcompletion(void *pd)
{ … }
static void i2c_pca_pf_dummyreset(void *pd)
{ … }
static void i2c_pca_pf_resetchip(void *pd)
{ … }
static irqreturn_t i2c_pca_pf_handler(int this_irq, void *dev_id)
{ … }
static int i2c_pca_pf_probe(struct platform_device *pdev)
{ … }
static void i2c_pca_pf_remove(struct platform_device *pdev)
{ … }
#ifdef CONFIG_OF
static const struct of_device_id i2c_pca_of_match_table[] = …;
MODULE_DEVICE_TABLE(of, i2c_pca_of_match_table);
#endif
static struct platform_driver i2c_pca_pf_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;