#include <linux/err.h>
#include <linux/io.h>
#include <linux/i2c.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/mfd/syscon.h>
#define GXP_MAX_I2C_ENGINE …
static const char * const gxp_i2c_name[] = …;
#define GXP_I2CINTSTAT …
#define GXP_I2CINTEN …
#define GXP_I2CSTAT …
#define MASK_STOP_EVENT …
#define MASK_ACK …
#define MASK_RW …
#define GXP_I2CEVTERR …
#define MASK_SLAVE_CMD_EVENT …
#define MASK_SLAVE_DATA_EVENT …
#define MASK_MASTER_EVENT …
#define GXP_I2CSNPDAT …
#define GXP_I2CMCMD …
#define GXP_I2CSCMD …
#define GXP_I2CSNPAA …
#define GXP_I2CADVFEAT …
#define GXP_I2COWNADR …
#define GXP_I2CFREQDIV …
#define GXP_I2CFLTFAIR …
#define GXP_I2CTMOEDG …
#define GXP_I2CCYCTIM …
#define SNOOP_EVT_CLR …
#define SLAVE_EVT_CLR …
#define SNOOP_EVT_MASK …
#define SLAVE_EVT_MASK …
#define SLAVE_ACK_ENAB …
#define SLAVE_EVT_STALL …
#define MASTER_EVT_CLR …
#define MASTER_ACK_ENAB …
#define RW_CMD …
#define STOP_CMD …
#define START_CMD …
#define GXP_DATA_EDGE_RST_CTRL …
#define FILTER_CNT …
#define FAIRNESS_CNT …
enum { … };
struct gxp_i2c_drvdata { … };
static struct regmap *i2cg_map;
static void gxp_i2c_start(struct gxp_i2c_drvdata *drvdata)
{ … }
static int gxp_i2c_master_xfer(struct i2c_adapter *adapter,
struct i2c_msg *msgs, int num)
{ … }
static u32 gxp_i2c_func(struct i2c_adapter *adap)
{ … }
#if IS_ENABLED(CONFIG_I2C_SLAVE)
static int gxp_i2c_reg_slave(struct i2c_client *slave)
{ … }
static int gxp_i2c_unreg_slave(struct i2c_client *slave)
{ … }
#endif
static const struct i2c_algorithm gxp_i2c_algo = …;
static void gxp_i2c_stop(struct gxp_i2c_drvdata *drvdata)
{ … }
static void gxp_i2c_restart(struct gxp_i2c_drvdata *drvdata)
{ … }
static void gxp_i2c_chk_addr_ack(struct gxp_i2c_drvdata *drvdata)
{ … }
static void gxp_i2c_ack_data(struct gxp_i2c_drvdata *drvdata)
{ … }
static void gxp_i2c_chk_data_ack(struct gxp_i2c_drvdata *drvdata)
{ … }
static bool gxp_i2c_slave_irq_handler(struct gxp_i2c_drvdata *drvdata)
{ … }
static irqreturn_t gxp_i2c_irq_handler(int irq, void *_drvdata)
{ … }
static void gxp_i2c_init(struct gxp_i2c_drvdata *drvdata)
{ … }
static int gxp_i2c_probe(struct platform_device *pdev)
{ … }
static void gxp_i2c_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id gxp_i2c_of_match[] = …;
MODULE_DEVICE_TABLE(of, gxp_i2c_of_match);
static struct platform_driver gxp_i2c_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;