OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio-comment] [PATCH V2] virtio-gpio: add the device specification



å 2021/6/4 äå8:58, Viresh Kumar åé:
On Fri, 4 Jun 2021 at 17:55, Enrico Weigelt, metux IT consult
<lkml@metux.net>  wrote:
On 04.06.21 10:09, Viresh Kumar wrote:
\\> > +\begin{lstlisting}
+struct virtio_gpio_config {
+    char name[32];
+    u16 ngpio;
+    u16 padding;
+    u32 gpio_names_size;
+    char gpio_names[0];
+} __attribute__((packed));
+\end{lstlisting}
oh no, please don't change the structs. the original one was:

struct virtio_gpio_config {
          __u8    version;
          __u8    reserved0;
          __u16   num_gpios;
          __u32   names_size;
          __u8    reserved1[24];
          __u8    name[32];
};

The version is vital - we need an upgrade path for future extensions.
(eg. bulk operations)
I did wonder about how versioning works in general for virtio and couldn't find
much for any device specification there.

Does anyone know how we handle different versions of the spec? Or is it left
for the individual protocols, GPIO in this case ?


The spec define some general features and it also allow device to implement its own features.

I guess in this case, it might be just a feature like VIRTIO_GPIO_F_BULK?

I'm not familiar with GPIO, but a question is, consider we have virtqueue, so actually bulking is already supported?

Thanks



Sure I will add it back, just wanted to get this disucussion going.




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]