Re: [PATCH V3 1/3] gpio: Add virtio-gpio driver
From: Arnd Bergmann <arnd@kernel.org>
Date: 2021-06-10 13:24:09
Also in:
lkml
On Thu, Jun 10, 2021 at 2:18 PM Viresh Kumar [off-list ref] wrote:
From: "Enrico Weigelt, metux IT consult" <info@metux.net> This patch adds a new driver for Virtio based GPIO devices. This allows a guest VM running Linux to access GPIO device provided by the host. It supports all basic operations for now, except interrupts for the GPIO lines. Signed-off-by: "Enrico Weigelt, metux IT consult" <info@metux.net> Co-developed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
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.
Arnd