Christopher Ferris | 2abfa9e | 2021-11-01 16:26:06 -0700 | [diff] [blame^] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef _LINUX_VIRTIO_GPIO_H |
| 20 | #define _LINUX_VIRTIO_GPIO_H |
| 21 | #include <linux/types.h> |
| 22 | #define VIRTIO_GPIO_MSG_GET_NAMES 0x0001 |
| 23 | #define VIRTIO_GPIO_MSG_GET_DIRECTION 0x0002 |
| 24 | #define VIRTIO_GPIO_MSG_SET_DIRECTION 0x0003 |
| 25 | #define VIRTIO_GPIO_MSG_GET_VALUE 0x0004 |
| 26 | #define VIRTIO_GPIO_MSG_SET_VALUE 0x0005 |
| 27 | #define VIRTIO_GPIO_STATUS_OK 0x0 |
| 28 | #define VIRTIO_GPIO_STATUS_ERR 0x1 |
| 29 | #define VIRTIO_GPIO_DIRECTION_NONE 0x00 |
| 30 | #define VIRTIO_GPIO_DIRECTION_OUT 0x01 |
| 31 | #define VIRTIO_GPIO_DIRECTION_IN 0x02 |
| 32 | struct virtio_gpio_config { |
| 33 | __le16 ngpio; |
| 34 | __u8 padding[2]; |
| 35 | __le32 gpio_names_size; |
| 36 | } __packed; |
| 37 | struct virtio_gpio_request { |
| 38 | __le16 type; |
| 39 | __le16 gpio; |
| 40 | __le32 value; |
| 41 | }; |
| 42 | struct virtio_gpio_response { |
| 43 | __u8 status; |
| 44 | __u8 value; |
| 45 | }; |
| 46 | struct virtio_gpio_response_get_names { |
| 47 | __u8 status; |
| 48 | __u8 value[]; |
| 49 | }; |
| 50 | #endif |