brintos

brintos / linux-shallow public Read only

0
0
Text · 1.2 KiB · acf3b60 Raw
48 lines · c
1/* SPDX-License-Identifier: GPL-2.0-or-later WITH Linux-syscall-note */2/*3 * Definitions for virtio I2C Adpter4 *5 * Copyright (c) 2021 Intel Corporation. All rights reserved.6 */7 8#ifndef _UAPI_LINUX_VIRTIO_I2C_H9#define _UAPI_LINUX_VIRTIO_I2C_H10 11#include <linux/const.h>12#include <linux/types.h>13 14/* Virtio I2C Feature bits */15#define VIRTIO_I2C_F_ZERO_LENGTH_REQUEST	016 17/* The bit 0 of the @virtio_i2c_out_hdr.@flags, used to group the requests */18#define VIRTIO_I2C_FLAGS_FAIL_NEXT	_BITUL(0)19 20/* The bit 1 of the @virtio_i2c_out_hdr.@flags, used to mark a buffer as read */21#define VIRTIO_I2C_FLAGS_M_RD		_BITUL(1)22 23/**24 * struct virtio_i2c_out_hdr - the virtio I2C message OUT header25 * @addr: the controlled device address26 * @padding: used to pad to full dword27 * @flags: used for feature extensibility28 */29struct virtio_i2c_out_hdr {30	__le16 addr;31	__le16 padding;32	__le32 flags;33};34 35/**36 * struct virtio_i2c_in_hdr - the virtio I2C message IN header37 * @status: the processing result from the backend38 */39struct virtio_i2c_in_hdr {40	__u8 status;41};42 43/* The final status written by the device */44#define VIRTIO_I2C_MSG_OK	045#define VIRTIO_I2C_MSG_ERR	146 47#endif /* _UAPI_LINUX_VIRTIO_I2C_H */48