[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210614102119.qifm5sj7fpg54iqo@vireshk-i7>
Date: Mon, 14 Jun 2021 15:51:19 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Bartosz Golaszewski <bgolaszewski@...libre.com>,
Linus Walleij <linus.walleij@...aro.org>,
"Enrico Weigelt, metux IT consult" <info@...ux.net>,
Viresh Kumar <vireshk@...nel.org>,
"Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Bill Mills <bill.mills@...aro.org>,
Alex Bennée <alex.bennee@...aro.org>,
Stratos Mailing List <stratos-dev@...lists.linaro.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Stefan Hajnoczi <stefanha@...hat.com>,
"Stefano Garzarella --cc virtualization @ lists . linux-foundation . org"
<sgarzare@...hat.com>, virtualization@...ts.linux-foundation.org
Subject: Re: [PATCH V3 1/3] gpio: Add virtio-gpio driver
On 10-06-21, 15:22, Arnd Bergmann wrote:
> Can you give an example of how this would be hooked up to other drivers
> using those gpios. Can you give an example of how using the "gpio-keys" or
> "gpio-leds" drivers in combination with virtio-gpio looks like in the DT?
>
> Would qemu simply add the required DT properties to the device node that
> corresponds to the virtio device in this case?
>
> From what I can tell, both the mmio and pci variants of virtio can have their
> dev->of_node populated, but I don't see the logic in register_virtio_device()
> that looks up the of_node of the virtio_device that the of_gpio code then
> tries to refer to.
To be honest, I haven't tried this yet and I was expecting it to be
already taken care of. I was relying on the DTB automatically
generated by Qemu to get the driver probed and didn't have a look at
it as well.
I now understand that it won't be that straight forward. The same must
be true for adding an i2c device to an i2c bus over virtio (The way I
tested that earlier was by using the sysfs file to add a device to a
bus).
This may be something lacking generally for virtio-pci thing, not
sure though.
--
viresh
Powered by blists - more mailing lists