#include <linux/device.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/nvmem-provider.h>
#define EE1004_MAX_BUSSES …
#define EE1004_ADDR_SET_PAGE …
#define EE1004_NUM_PAGES …
#define EE1004_PAGE_SIZE …
#define EE1004_PAGE_SHIFT …
#define EE1004_EEPROM_SIZE …
static DEFINE_MUTEX(ee1004_bus_lock);
static struct ee1004_bus_data { … } ee1004_bus_data[EE1004_MAX_BUSSES];
static const struct i2c_device_id ee1004_ids[] = …;
MODULE_DEVICE_TABLE(i2c, ee1004_ids);
static struct ee1004_bus_data *ee1004_get_bus_data(struct i2c_adapter *adap)
{ … }
static int ee1004_get_current_page(struct ee1004_bus_data *bd)
{ … }
static int ee1004_set_current_page(struct i2c_client *client, int page)
{ … }
static ssize_t ee1004_eeprom_read(struct i2c_client *client, char *buf,
unsigned int offset, size_t count)
{ … }
static int ee1004_read(void *priv, unsigned int off, void *val, size_t count)
{ … }
static void ee1004_probe_temp_sensor(struct i2c_client *client)
{ … }
static void ee1004_cleanup(int idx, struct ee1004_bus_data *bd)
{ … }
static void ee1004_cleanup_bus_data(void *data)
{ … }
static int ee1004_init_bus_data(struct i2c_client *client)
{ … }
static int ee1004_probe(struct i2c_client *client)
{ … }
static struct i2c_driver ee1004_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;