qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH V2 1/6] !Merge: Update virtio headers from kernel


From: Viresh Kumar
Subject: [PATCH V2 1/6] !Merge: Update virtio headers from kernel
Date: Thu, 1 Apr 2021 17:42:30 +0530

DO NOT MERGE

Update Linux virtio headers with help of

  ./scripts/update-linux-headers.sh ~/lsrc/linux.git

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 include/standard-headers/linux/virtio_i2c.h | 40 +++++++++++++++++++++
 include/standard-headers/linux/virtio_ids.h |  1 +
 2 files changed, 41 insertions(+)
 create mode 100644 include/standard-headers/linux/virtio_i2c.h

diff --git a/include/standard-headers/linux/virtio_i2c.h 
b/include/standard-headers/linux/virtio_i2c.h
new file mode 100644
index 000000000000..378d31c4a527
--- /dev/null
+++ b/include/standard-headers/linux/virtio_i2c.h
@@ -0,0 +1,40 @@
+/* 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 "standard-headers/linux/types.h"
+
+/* The bit 0 of the @virtio_i2c_out_hdr.@flags, used to group the requests */
+#define VIRTIO_I2C_FLAGS_FAIL_NEXT     0x00000001
+
+/**
+ * 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 {
+       uint16_t addr;
+       uint16_t padding;
+       uint32_t flags;
+};
+
+/**
+ * struct virtio_i2c_in_hdr - the virtio I2C message IN header
+ * @status: the processing result from the backend
+ */
+struct virtio_i2c_in_hdr {
+       uint8_t 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 */
diff --git a/include/standard-headers/linux/virtio_ids.h 
b/include/standard-headers/linux/virtio_ids.h
index bc1c0621f5ed..b89391dff6c9 100644
--- a/include/standard-headers/linux/virtio_ids.h
+++ b/include/standard-headers/linux/virtio_ids.h
@@ -54,5 +54,6 @@
 #define VIRTIO_ID_FS                   26 /* virtio filesystem */
 #define VIRTIO_ID_PMEM                 27 /* virtio pmem */
 #define VIRTIO_ID_MAC80211_HWSIM       29 /* virtio mac80211-hwsim */
+#define VIRTIO_ID_I2C_ADAPTER          34 /* virtio i2c adapter */
 
 #endif /* _LINUX_VIRTIO_IDS_H */
-- 
2.25.0.rc1.19.g042ed3e048af




reply via email to

[Prev in Thread] Current Thread [Next in Thread]