> Regarding type, it’s needed, especially for the in packets. There are two 
> distinct kinds of incoming 
> packets: notification‑in and reply‑in. Because of that differences, Combining 
> cmd and type would 
> blur that distinction and complicate the implementation.

[Goes and looks at gpio-virtio]

https://elixir.bootlin.com/linux/v6.19.3/source/include/uapi/linux/virtio_gpio.h#L13

/* Virtio GPIO request types */
#define VIRTIO_GPIO_MSG_GET_NAMES               0x0001
#define VIRTIO_GPIO_MSG_GET_DIRECTION           0x0002
#define VIRTIO_GPIO_MSG_SET_DIRECTION           0x0003
#define VIRTIO_GPIO_MSG_GET_VALUE               0x0004
#define VIRTIO_GPIO_MSG_SET_VALUE               0x0005
#define VIRTIO_GPIO_MSG_IRQ_TYPE                0x0006

        Andrew
 

Reply via email to