1 /*
2  * Vhost-user i2c virtio device
3  *
4  * Copyright (c) 2021 Viresh Kumar <viresh.kumar@linaro.org>
5  *
6  * SPDX-License-Identifier: GPL-2.0-or-later
7  */
8 
9 #ifndef _QEMU_VHOST_USER_I2C_H
10 #define _QEMU_VHOST_USER_I2C_H
11 
12 #include "hw/virtio/vhost.h"
13 #include "hw/virtio/vhost-user.h"
14 
15 #define TYPE_VHOST_USER_I2C "vhost-user-i2c-device"
16 OBJECT_DECLARE_SIMPLE_TYPE(VHostUserI2C, VHOST_USER_I2C)
17 
18 struct VHostUserI2C {
19     VirtIODevice parent;
20     CharBackend chardev;
21     struct vhost_virtqueue *vhost_vq;
22     struct vhost_dev vhost_dev;
23     VhostUserState vhost_user;
24     VirtQueue *vq;
25     bool connected;
26 };
27 
28 #endif /* _QEMU_VHOST_USER_I2C_H */
29