]> Git Repo - linux.git/blob - include/uapi/linux/virtio_gpio.h
md/raid1: only allocate write behind bio for WriteMostly device
[linux.git] / include / uapi / linux / virtio_gpio.h
1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2
3 #ifndef _LINUX_VIRTIO_GPIO_H
4 #define _LINUX_VIRTIO_GPIO_H
5
6 #include <linux/types.h>
7
8 /* Virtio GPIO request types */
9 #define VIRTIO_GPIO_MSG_GET_NAMES               0x0001
10 #define VIRTIO_GPIO_MSG_GET_DIRECTION           0x0002
11 #define VIRTIO_GPIO_MSG_SET_DIRECTION           0x0003
12 #define VIRTIO_GPIO_MSG_GET_VALUE               0x0004
13 #define VIRTIO_GPIO_MSG_SET_VALUE               0x0005
14
15 /* Possible values of the status field */
16 #define VIRTIO_GPIO_STATUS_OK                   0x0
17 #define VIRTIO_GPIO_STATUS_ERR                  0x1
18
19 /* Direction types */
20 #define VIRTIO_GPIO_DIRECTION_NONE              0x00
21 #define VIRTIO_GPIO_DIRECTION_OUT               0x01
22 #define VIRTIO_GPIO_DIRECTION_IN                0x02
23
24 struct virtio_gpio_config {
25         __le16 ngpio;
26         __u8 padding[2];
27         __le32 gpio_names_size;
28 } __packed;
29
30 /* Virtio GPIO Request / Response */
31 struct virtio_gpio_request {
32         __le16 type;
33         __le16 gpio;
34         __le32 value;
35 };
36
37 struct virtio_gpio_response {
38         __u8 status;
39         __u8 value;
40 };
41
42 struct virtio_gpio_response_get_names {
43         __u8 status;
44         __u8 value[];
45 };
46
47 #endif /* _LINUX_VIRTIO_GPIO_H */
This page took 0.036063 seconds and 4 git commands to generate.