linux/drivers/i2c/busses/i2c-ljca.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Intel La Jolla Cove Adapter USB-I2C driver
 *
 * Copyright (c) 2023, Intel Corporation.
 */

#include <linux/acpi.h>
#include <linux/auxiliary_bus.h>
#include <linux/bitfield.h>
#include <linux/bits.h>
#include <linux/dev_printk.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/usb/ljca.h>

/* I2C init flags */
#define LJCA_I2C_INIT_FLAG_MODE
#define LJCA_I2C_INIT_FLAG_MODE_POLLING
#define LJCA_I2C_INIT_FLAG_MODE_INTERRUPT

#define LJCA_I2C_INIT_FLAG_ADDR_16BIT

#define LJCA_I2C_INIT_FLAG_FREQ
#define LJCA_I2C_INIT_FLAG_FREQ_100K
#define LJCA_I2C_INIT_FLAG_FREQ_400K
#define LJCA_I2C_INIT_FLAG_FREQ_1M

#define LJCA_I2C_BUF_SIZE
#define LJCA_I2C_MAX_XFER_SIZE

/* I2C commands */
enum ljca_i2c_cmd {};

enum ljca_xfer_type {};

/* I2C raw commands: Init/Start/Read/Write/Stop */
struct ljca_i2c_rw_packet {} __packed;

struct ljca_i2c_dev {};

static int ljca_i2c_init(struct ljca_i2c_dev *ljca_i2c, u8 id)
{}

static int ljca_i2c_start(struct ljca_i2c_dev *ljca_i2c, u8 target_addr,
			  enum ljca_xfer_type type)
{}

static void ljca_i2c_stop(struct ljca_i2c_dev *ljca_i2c, u8 target_addr)
{}

static int ljca_i2c_pure_read(struct ljca_i2c_dev *ljca_i2c, u8 *data, u8 len)
{}

static int ljca_i2c_read(struct ljca_i2c_dev *ljca_i2c, u8 target_addr, u8 *data,
			 u8 len)
{}

static int ljca_i2c_pure_write(struct ljca_i2c_dev *ljca_i2c, u8 *data, u8 len)
{}

static int ljca_i2c_write(struct ljca_i2c_dev *ljca_i2c, u8 target_addr,
			  u8 *data, u8 len)
{}

static int ljca_i2c_xfer(struct i2c_adapter *adapter, struct i2c_msg *msg,
			 int num)
{}

static u32 ljca_i2c_func(struct i2c_adapter *adap)
{}

static const struct i2c_adapter_quirks ljca_i2c_quirks =;

static const struct i2c_algorithm ljca_i2c_algo =;

static int ljca_i2c_probe(struct auxiliary_device *auxdev,
			  const struct auxiliary_device_id *aux_dev_id)
{}

static void ljca_i2c_remove(struct auxiliary_device *auxdev)
{}

static const struct auxiliary_device_id ljca_i2c_id_table[] =;
MODULE_DEVICE_TABLE(auxiliary, ljca_i2c_id_table);

static struct auxiliary_driver ljca_i2c_driver =;
module_auxiliary_driver();

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