1 /* SPDX-License-Identifier: GPL-2.0-or-later WITH Linux-syscall-note */
3 * Definitions for virtio I2C Adpter
5 * Copyright (c) 2021 Intel Corporation. All rights reserved.
8 #ifndef _UAPI_LINUX_VIRTIO_I2C_H
9 #define _UAPI_LINUX_VIRTIO_I2C_H
11 #include <linux/const.h>
12 #include <linux/types.h>
14 /* The bit 0 of the @virtio_i2c_out_hdr.@flags, used to group the requests */
15 #define VIRTIO_I2C_FLAGS_FAIL_NEXT _BITUL(0)
18 * struct virtio_i2c_out_hdr - the virtio I2C message OUT header
19 * @addr: the controlled device address
20 * @padding: used to pad to full dword
21 * @flags: used for feature extensibility
23 struct virtio_i2c_out_hdr {
30 * struct virtio_i2c_in_hdr - the virtio I2C message IN header
31 * @status: the processing result from the backend
33 struct virtio_i2c_in_hdr {
37 /* The final status written by the device */
38 #define VIRTIO_I2C_MSG_OK 0
39 #define VIRTIO_I2C_MSG_ERR 1
41 #endif /* _UAPI_LINUX_VIRTIO_I2C_H */