linux/drivers/i2c/busses/i2c-qcom-cci.c

// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
// Copyright (c) 2017-2022 Linaro Limited.

#include <linux/clk.h>
#include <linux/completion.h>
#include <linux/i2c.h>
#include <linux/io.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>

#define CCI_HW_VERSION
#define CCI_RESET_CMD
#define CCI_RESET_CMD_MASK
#define CCI_RESET_CMD_M0_MASK
#define CCI_RESET_CMD_M1_MASK
#define CCI_QUEUE_START
#define CCI_HALT_REQ
#define CCI_HALT_REQ_I2C_M0_Q0Q1
#define CCI_HALT_REQ_I2C_M1_Q0Q1

#define CCI_I2C_Mm_SCL_CTL(m)
#define CCI_I2C_Mm_SDA_CTL_0(m)
#define CCI_I2C_Mm_SDA_CTL_1(m)
#define CCI_I2C_Mm_SDA_CTL_2(m)
#define CCI_I2C_Mm_MISC_CTL(m)

#define CCI_I2C_Mm_READ_DATA(m)
#define CCI_I2C_Mm_READ_BUF_LEVEL(m)
#define CCI_I2C_Mm_Qn_EXEC_WORD_CNT(m, n)
#define CCI_I2C_Mm_Qn_CUR_WORD_CNT(m, n)
#define CCI_I2C_Mm_Qn_CUR_CMD(m, n)
#define CCI_I2C_Mm_Qn_REPORT_STATUS(m, n)
#define CCI_I2C_Mm_Qn_LOAD_DATA(m, n)

#define CCI_IRQ_GLOBAL_CLEAR_CMD
#define CCI_IRQ_MASK_0
#define CCI_IRQ_MASK_0_I2C_M0_RD_DONE
#define CCI_IRQ_MASK_0_I2C_M0_Q0_REPORT
#define CCI_IRQ_MASK_0_I2C_M0_Q1_REPORT
#define CCI_IRQ_MASK_0_I2C_M1_RD_DONE
#define CCI_IRQ_MASK_0_I2C_M1_Q0_REPORT
#define CCI_IRQ_MASK_0_I2C_M1_Q1_REPORT
#define CCI_IRQ_MASK_0_RST_DONE_ACK
#define CCI_IRQ_MASK_0_I2C_M0_Q0Q1_HALT_ACK
#define CCI_IRQ_MASK_0_I2C_M1_Q0Q1_HALT_ACK
#define CCI_IRQ_MASK_0_I2C_M0_ERROR
#define CCI_IRQ_MASK_0_I2C_M1_ERROR
#define CCI_IRQ_CLEAR_0
#define CCI_IRQ_STATUS_0
#define CCI_IRQ_STATUS_0_I2C_M0_RD_DONE
#define CCI_IRQ_STATUS_0_I2C_M0_Q0_REPORT
#define CCI_IRQ_STATUS_0_I2C_M0_Q1_REPORT
#define CCI_IRQ_STATUS_0_I2C_M1_RD_DONE
#define CCI_IRQ_STATUS_0_I2C_M1_Q0_REPORT
#define CCI_IRQ_STATUS_0_I2C_M1_Q1_REPORT
#define CCI_IRQ_STATUS_0_RST_DONE_ACK
#define CCI_IRQ_STATUS_0_I2C_M0_Q0Q1_HALT_ACK
#define CCI_IRQ_STATUS_0_I2C_M1_Q0Q1_HALT_ACK
#define CCI_IRQ_STATUS_0_I2C_M0_Q0_NACK_ERR
#define CCI_IRQ_STATUS_0_I2C_M0_Q1_NACK_ERR
#define CCI_IRQ_STATUS_0_I2C_M1_Q0_NACK_ERR
#define CCI_IRQ_STATUS_0_I2C_M1_Q1_NACK_ERR
#define CCI_IRQ_STATUS_0_I2C_M0_ERROR
#define CCI_IRQ_STATUS_0_I2C_M1_ERROR

#define CCI_TIMEOUT
#define NUM_MASTERS
#define NUM_QUEUES

/* Max number of resources + 1 for a NULL terminator */
#define CCI_RES_MAX

#define CCI_I2C_SET_PARAM
#define CCI_I2C_REPORT
#define CCI_I2C_WRITE
#define CCI_I2C_READ

#define CCI_I2C_REPORT_IRQ_EN

enum {};

enum cci_i2c_queue_t {};

struct hw_params {};

struct cci;

struct cci_master {};

struct cci_data {};

struct cci {};

static irqreturn_t cci_isr(int irq, void *dev)
{}

static int cci_halt(struct cci *cci, u8 master_num)
{}

static int cci_reset(struct cci *cci)
{}

static int cci_init(struct cci *cci)
{}

static int cci_run_queue(struct cci *cci, u8 master, u8 queue)
{}

static int cci_validate_queue(struct cci *cci, u8 master, u8 queue)
{}

static int cci_i2c_read(struct cci *cci, u16 master,
			u16 addr, u8 *buf, u16 len)
{}

static int cci_i2c_write(struct cci *cci, u16 master,
			 u16 addr, u8 *buf, u16 len)
{}

static int cci_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
{}

static u32 cci_func(struct i2c_adapter *adap)
{}

static const struct i2c_algorithm cci_algo =;

static int cci_enable_clocks(struct cci *cci)
{}

static void cci_disable_clocks(struct cci *cci)
{}

static int __maybe_unused cci_suspend_runtime(struct device *dev)
{}

static int __maybe_unused cci_resume_runtime(struct device *dev)
{}

static int __maybe_unused cci_suspend(struct device *dev)
{}

static int __maybe_unused cci_resume(struct device *dev)
{}

static const struct dev_pm_ops qcom_cci_pm =;

static int cci_probe(struct platform_device *pdev)
{}

static void cci_remove(struct platform_device *pdev)
{}

static const struct cci_data cci_v1_data =;

static const struct cci_data cci_v1_5_data =;

static const struct cci_data cci_v2_data =;

static const struct of_device_id cci_dt_match[] =;
MODULE_DEVICE_TABLE(of, cci_dt_match);

static struct platform_driver qcom_cci_driver =;

module_platform_driver();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_AUTHOR();
MODULE_LICENSE();