[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a2SmZcqrJcget=7-p07GsHqAfiDgzjEQOC6NHwaFydgPQ@mail.gmail.com>
Date: Mon, 14 Jun 2021 22:54:37 +0200
From: Arnd Bergmann <arnd@...nel.org>
To: Vincent Guittot <vincent.guittot@...aro.org>
Cc: Stefan Hajnoczi <stefanha@...hat.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Linus Walleij <linus.walleij@...aro.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
virtualization@...ts.linux-foundation.org,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
"Stefano Garzarella --cc virtualization @ lists . linux-foundation . org"
<sgarzare@...hat.com>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
Viresh Kumar <vireshk@...nel.org>,
Stratos Mailing List <stratos-dev@...lists.linaro.org>,
"Enrico Weigelt, metux IT consult" <info@...ux.net>,
Jason Wang <jasowang@...hat.com>
Subject: Re: [Stratos-dev] [PATCH V3 1/3] gpio: Add virtio-gpio driver
On Mon, Jun 14, 2021 at 3:24 PM Vincent Guittot
<vincent.guittot@...aro.org> wrote:
> On Mon, 14 Jun 2021 at 15:00, Arnd Bergmann <arnd@...nel.org> wrote:
> > On Mon, Jun 14, 2021 at 2:50 PM Vincent Guittot via Stratos-dev <stratos-dev@...lists.linaro.org> wrote:>
> >
> > But this example seem to be completely different from the ones I mentioned:
> > The scmi node that you have here looks like it shows up under the root of the
> > device tree, not below the virtio device that implements the scmi transport.
>
> I was thinking of something like below:
>
> deviceX: deviceX@...YYYY {
> ...
> gpio = <&virtio_gpio 0>;
> ...
> };
>
> virtio_mmio@...0000 {
> dma-coherent;
> interrupts = <0x0 0x10 0x1>;
> reg = <0x0 0xa000000 0x0 0x200>;
> compatible = "virtio,mmio";
>
> virtio_gpio: protocol@22 {
> reg = <0x22>;
> };
Encoding the device ID as "reg" seems somewhat odd, especially since there
can only be one child for each virtio device. The other bus types use the
"compatible" property instead of "reg" for this purpose. This is still
redundant,
since the type is also known from the contents, but it seems less unusual.
The gpio node in the example is usually called "gpio" or "gpio-controller", and
it would then need the "gpio-controller" and "#gpio-cells" properties so other
nodes can refer to it by phandle.
Arnd
Powered by blists - more mailing lists