linux/drivers/i2c/busses/i2c-viai2c-zhaoxin.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  Copyright(c) 2024 Shanghai Zhaoxin Semiconductor Corporation.
 *                    All rights reserved.
 */

#include <linux/acpi.h>
#include "i2c-viai2c-common.h"

/*
 * registers
 */
/* Zhaoxin specific register bit fields */
/* REG_CR Bit fields */
#define ZXI2C_CR_MST_RST
#define ZXI2C_CR_FIFO_MODE
/* REG_ISR/IMR Bit fields */
#define ZXI2C_IRQ_FIFONACK
#define ZXI2C_IRQ_FIFOEND
#define ZXI2C_IRQ_MASK
/* Zhaoxin specific registers */
#define ZXI2C_REG_CLK
#define ZXI2C_CLK_50M
#define ZXI2C_REG_REV
#define ZXI2C_REG_HCR
#define ZXI2C_HCR_RST_FIFO
#define ZXI2C_REG_HTDR
#define ZXI2C_REG_HRDR
#define ZXI2C_REG_HTLR
#define ZXI2C_REG_HRLR
#define ZXI2C_REG_HWCNTR
#define ZXI2C_REG_HRCNTR

/* parameters Constants */
#define ZXI2C_GOLD_FSTP_100K
#define ZXI2C_GOLD_FSTP_400K
#define ZXI2C_GOLD_FSTP_1M
#define ZXI2C_GOLD_FSTP_3400K
#define ZXI2C_HS_CTRL_CODE

#define ZXI2C_FIFO_SIZE

struct viai2c_zhaoxin {};

static int viai2c_fifo_xfer(struct viai2c *i2c)
{}

static int viai2c_fifo_irq_xfer(struct viai2c *i2c)
{}

static int zxi2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
{}

static u32 zxi2c_func(struct i2c_adapter *adap)
{}

static const struct i2c_algorithm zxi2c_algorithm =;

static const struct i2c_adapter_quirks zxi2c_quirks =;

static const u32 zxi2c_speed_params_table[][3] =;

static void zxi2c_set_bus_speed(struct viai2c *i2c)
{}

static void zxi2c_get_bus_speed(struct viai2c *i2c)
{}

static irqreturn_t zxi2c_isr(int irq, void *data)
{}

static int zxi2c_probe(struct platform_device *pdev)
{}

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

static const struct dev_pm_ops zxi2c_pm =;

static const struct acpi_device_id zxi2c_acpi_match[] =;
MODULE_DEVICE_TABLE(acpi, zxi2c_acpi_match);

static struct platform_driver zxi2c_driver =;

module_platform_driver();

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