#include <linux/bitfield.h>
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/i3c/master.h>
#include <linux/interrupt.h>
#include <linux/iopoll.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include "hci.h"
#include "ext_caps.h"
#include "cmd.h"
#include "dat.h"
#define HCI_VERSION …
#define HC_CONTROL …
#define HC_CONTROL_BUS_ENABLE …
#define HC_CONTROL_RESUME …
#define HC_CONTROL_ABORT …
#define HC_CONTROL_HALT_ON_CMD_TIMEOUT …
#define HC_CONTROL_HOT_JOIN_CTRL …
#define HC_CONTROL_I2C_TARGET_PRESENT …
#define HC_CONTROL_PIO_MODE …
#define HC_CONTROL_DATA_BIG_ENDIAN …
#define HC_CONTROL_IBA_INCLUDE …
#define MASTER_DEVICE_ADDR …
#define MASTER_DYNAMIC_ADDR_VALID …
#define MASTER_DYNAMIC_ADDR(v) …
#define HC_CAPABILITIES …
#define HC_CAP_SG_DC_EN …
#define HC_CAP_SG_IBI_EN …
#define HC_CAP_SG_CR_EN …
#define HC_CAP_MAX_DATA_LENGTH …
#define HC_CAP_CMD_SIZE …
#define HC_CAP_DIRECT_COMMANDS_EN …
#define HC_CAP_MULTI_LANE_EN …
#define HC_CAP_CMD_CCC_DEFBYTE …
#define HC_CAP_HDR_BT_EN …
#define HC_CAP_HDR_TS_EN …
#define HC_CAP_HDR_DDR_EN …
#define HC_CAP_NON_CURRENT_MASTER_CAP …
#define HC_CAP_DATA_BYTE_CFG_EN …
#define HC_CAP_AUTO_COMMAND …
#define HC_CAP_COMBO_COMMAND …
#define RESET_CONTROL …
#define BUS_RESET …
#define BUS_RESET_TYPE …
#define IBI_QUEUE_RST …
#define RX_FIFO_RST …
#define TX_FIFO_RST …
#define RESP_QUEUE_RST …
#define CMD_QUEUE_RST …
#define SOFT_RST …
#define PRESENT_STATE …
#define STATE_CURRENT_MASTER …
#define INTR_STATUS …
#define INTR_STATUS_ENABLE …
#define INTR_SIGNAL_ENABLE …
#define INTR_FORCE …
#define INTR_HC_CMD_SEQ_UFLOW_STAT …
#define INTR_HC_RESET_CANCEL …
#define INTR_HC_INTERNAL_ERR …
#define INTR_HC_PIO …
#define INTR_HC_RINGS …
#define DAT_SECTION …
#define DAT_ENTRY_SIZE …
#define DAT_TABLE_SIZE …
#define DAT_TABLE_OFFSET …
#define DCT_SECTION …
#define DCT_ENTRY_SIZE …
#define DCT_TABLE_INDEX …
#define DCT_TABLE_SIZE …
#define DCT_TABLE_OFFSET …
#define RING_HEADERS_SECTION …
#define RING_HEADERS_OFFSET …
#define PIO_SECTION …
#define PIO_REGS_OFFSET …
#define EXT_CAPS_SECTION …
#define EXT_CAPS_OFFSET …
#define IBI_NOTIFY_CTRL …
#define IBI_NOTIFY_SIR_REJECTED …
#define IBI_NOTIFY_MR_REJECTED …
#define IBI_NOTIFY_HJ_REJECTED …
#define DEV_CTX_BASE_LO …
#define DEV_CTX_BASE_HI …
static inline struct i3c_hci *to_i3c_hci(struct i3c_master_controller *m)
{ … }
static int i3c_hci_bus_init(struct i3c_master_controller *m)
{ … }
static void i3c_hci_bus_cleanup(struct i3c_master_controller *m)
{ … }
void mipi_i3c_hci_resume(struct i3c_hci *hci)
{ … }
void mipi_i3c_hci_pio_reset(struct i3c_hci *hci)
{ … }
void mipi_i3c_hci_dct_index_reset(struct i3c_hci *hci)
{ … }
static int i3c_hci_send_ccc_cmd(struct i3c_master_controller *m,
struct i3c_ccc_cmd *ccc)
{ … }
static int i3c_hci_daa(struct i3c_master_controller *m)
{ … }
static int i3c_hci_alloc_safe_xfer_buf(struct i3c_hci *hci,
struct hci_xfer *xfer)
{ … }
static void i3c_hci_free_safe_xfer_buf(struct i3c_hci *hci,
struct hci_xfer *xfer)
{ … }
static int i3c_hci_priv_xfers(struct i3c_dev_desc *dev,
struct i3c_priv_xfer *i3c_xfers,
int nxfers)
{ … }
static int i3c_hci_i2c_xfers(struct i2c_dev_desc *dev,
const struct i2c_msg *i2c_xfers, int nxfers)
{ … }
static int i3c_hci_attach_i3c_dev(struct i3c_dev_desc *dev)
{ … }
static int i3c_hci_reattach_i3c_dev(struct i3c_dev_desc *dev, u8 old_dyn_addr)
{ … }
static void i3c_hci_detach_i3c_dev(struct i3c_dev_desc *dev)
{ … }
static int i3c_hci_attach_i2c_dev(struct i2c_dev_desc *dev)
{ … }
static void i3c_hci_detach_i2c_dev(struct i2c_dev_desc *dev)
{ … }
static int i3c_hci_request_ibi(struct i3c_dev_desc *dev,
const struct i3c_ibi_setup *req)
{ … }
static void i3c_hci_free_ibi(struct i3c_dev_desc *dev)
{ … }
static int i3c_hci_enable_ibi(struct i3c_dev_desc *dev)
{ … }
static int i3c_hci_disable_ibi(struct i3c_dev_desc *dev)
{ … }
static void i3c_hci_recycle_ibi_slot(struct i3c_dev_desc *dev,
struct i3c_ibi_slot *slot)
{ … }
static const struct i3c_master_controller_ops i3c_hci_ops = …;
static irqreturn_t i3c_hci_irq_handler(int irq, void *dev_id)
{ … }
static int i3c_hci_init(struct i3c_hci *hci)
{ … }
static int i3c_hci_probe(struct platform_device *pdev)
{ … }
static void i3c_hci_remove(struct platform_device *pdev)
{ … }
static const __maybe_unused struct of_device_id i3c_hci_of_match[] = …;
MODULE_DEVICE_TABLE(of, i3c_hci_of_match);
static const struct acpi_device_id i3c_hci_acpi_match[] = …;
MODULE_DEVICE_TABLE(acpi, i3c_hci_acpi_match);
static struct platform_driver i3c_hci_driver = …;
module_platform_driver(…) …;
MODULE_ALIAS(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;