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

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Virtio I2C Bus Driver
 *
 * The Virtio I2C Specification:
 * https://raw.githubusercontent.com/oasis-tcs/virtio-spec/master/virtio-i2c.tex
 *
 * Copyright (c) 2021 Intel Corporation. All rights reserved.
 */

#include <linux/acpi.h>
#include <linux/completion.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/virtio.h>
#include <linux/virtio_ids.h>
#include <linux/virtio_config.h>
#include <linux/virtio_i2c.h>

/**
 * struct virtio_i2c - virtio I2C data
 * @vdev: virtio device for this controller
 * @adap: I2C adapter for this controller
 * @vq: the virtio virtqueue for communication
 */
struct virtio_i2c {};

/**
 * struct virtio_i2c_req - the virtio I2C request structure
 * @completion: completion of virtio I2C message
 * @out_hdr: the OUT header of the virtio I2C message
 * @buf: the buffer into which data is read, or from which it's written
 * @in_hdr: the IN header of the virtio I2C message
 */
struct virtio_i2c_req {};

static void virtio_i2c_msg_done(struct virtqueue *vq)
{}

static int virtio_i2c_prepare_reqs(struct virtqueue *vq,
				   struct virtio_i2c_req *reqs,
				   struct i2c_msg *msgs, int num)
{}

static int virtio_i2c_complete_reqs(struct virtqueue *vq,
				    struct virtio_i2c_req *reqs,
				    struct i2c_msg *msgs, int num)
{}

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

static void virtio_i2c_del_vqs(struct virtio_device *vdev)
{}

static int virtio_i2c_setup_vqs(struct virtio_i2c *vi)
{}

static u32 virtio_i2c_func(struct i2c_adapter *adap)
{}

static struct i2c_algorithm virtio_algorithm =;

static int virtio_i2c_probe(struct virtio_device *vdev)
{}

static void virtio_i2c_remove(struct virtio_device *vdev)
{}

static struct virtio_device_id id_table[] =;
MODULE_DEVICE_TABLE(virtio, id_table);

static int virtio_i2c_freeze(struct virtio_device *vdev)
{}

static int virtio_i2c_restore(struct virtio_device *vdev)
{}

static const unsigned int features[] =;

static struct virtio_driver virtio_i2c_driver =;
module_virtio_driver();

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