mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 22:04:21 +00:00
* Add missing Linux headers. Closes #9837 * Update existing headers to latest Linux. * Consolidate headers that are the same for multiple Zig target CPU architectures. For example, Linux has only an x86 directory for both x86_64 and x86 CPU architectures. Now Zig only ships an x86 directory for Linux headers, and will emit the proper corresponding -isystem flags. * tools/update-linux-headers.zig is now available for upgrading to newer Linux headers, and the update process is now documented on the wiki.
47 lines
No EOL
1.2 KiB
C
Vendored
47 lines
No EOL
1.2 KiB
C
Vendored
/* SPDX-License-Identifier: GPL-2.0-or-later WITH Linux-syscall-note */
|
|
/*
|
|
* Definitions for virtio I2C Adpter
|
|
*
|
|
* Copyright (c) 2021 Intel Corporation. All rights reserved.
|
|
*/
|
|
|
|
#ifndef _LINUX_VIRTIO_I2C_H
|
|
#define _LINUX_VIRTIO_I2C_H
|
|
|
|
#include <linux/const.h>
|
|
#include <linux/types.h>
|
|
|
|
/* Virtio I2C Feature bits */
|
|
#define VIRTIO_I2C_F_ZERO_LENGTH_REQUEST 0
|
|
|
|
/* The bit 0 of the @virtio_i2c_out_hdr.@flags, used to group the requests */
|
|
#define VIRTIO_I2C_FLAGS_FAIL_NEXT _BITUL(0)
|
|
|
|
/* The bit 1 of the @virtio_i2c_out_hdr.@flags, used to mark a buffer as read */
|
|
#define VIRTIO_I2C_FLAGS_M_RD _BITUL(1)
|
|
|
|
/**
|
|
* struct virtio_i2c_out_hdr - the virtio I2C message OUT header
|
|
* @addr: the controlled device address
|
|
* @padding: used to pad to full dword
|
|
* @flags: used for feature extensibility
|
|
*/
|
|
struct virtio_i2c_out_hdr {
|
|
__le16 addr;
|
|
__le16 padding;
|
|
__le32 flags;
|
|
};
|
|
|
|
/**
|
|
* struct virtio_i2c_in_hdr - the virtio I2C message IN header
|
|
* @status: the processing result from the backend
|
|
*/
|
|
struct virtio_i2c_in_hdr {
|
|
__u8 status;
|
|
};
|
|
|
|
/* The final status written by the device */
|
|
#define VIRTIO_I2C_MSG_OK 0
|
|
#define VIRTIO_I2C_MSG_ERR 1
|
|
|
|
#endif /* _LINUX_VIRTIO_I2C_H */ |