#include <linux/device.h>
#include <linux/errno.h>
#include <linux/fsi-occ.h>
#include <linux/i2c.h>
#include <linux/jiffies.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/unaligned.h>
#include "common.h"
#define OCC_TIMEOUT_MS …
#define OCC_CMD_IN_PRG_WAIT_MS …
#define OCB_DATA1 …
#define OCB_ADDR …
#define OCB_DATA3 …
#define OCC_SRAM_ADDR_CMD …
#define OCC_SRAM_ADDR_RESP …
#define OCC_DATA_ATTN …
struct p8_i2c_occ { … };
#define to_p8_i2c_occ(x) …
static int p8_i2c_occ_getscom(struct i2c_client *client, u32 address, u8 *data)
{ … }
static int p8_i2c_occ_putscom(struct i2c_client *client, u32 address, u8 *data)
{ … }
static int p8_i2c_occ_putscom_u32(struct i2c_client *client, u32 address,
u32 data0, u32 data1)
{ … }
static int p8_i2c_occ_putscom_be(struct i2c_client *client, u32 address,
u8 *data, size_t len)
{ … }
static int p8_i2c_occ_send_cmd(struct occ *occ, u8 *cmd, size_t len,
void *resp, size_t resp_len)
{ … }
static int p8_i2c_occ_probe(struct i2c_client *client)
{ … }
static void p8_i2c_occ_remove(struct i2c_client *client)
{ … }
static const struct of_device_id p8_i2c_occ_of_match[] = …;
MODULE_DEVICE_TABLE(of, p8_i2c_occ_of_match);
static struct i2c_driver p8_i2c_occ_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;