]> www.infradead.org Git - users/jedix/linux-maple.git/commit
gpio: virtio: support multiple virtio-gpio controller instances
authorhlleng <a909204013@gmail.com>
Mon, 10 Feb 2025 11:49:35 +0000 (19:49 +0800)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 11 Feb 2025 08:21:18 +0000 (09:21 +0100)
commit84693df49dac458e980eaf37f26ae6e23ead98d5
tree3ea31660e6ba481c5662ca6dc6678ae6d736bac6
parente8f2ca6be61f1cae2ff12932fa03224581b6b231
gpio: virtio: support multiple virtio-gpio controller instances

Modify the virtio-gpio driver to support multiple virtual GPIO controller
instances. The previous static global irq_chip structure caused conflicts
between multiple virtio-gpio device instances as they shared the same
interrupt controller configuration.

Fix this by:
1. Remove the static global vgpio_irq_chip structure
2. Dynamically allocate a dedicated irq_chip for each virtio-gpio instance
3. Use device-specific names for each instance's irq_chip

Signed-off-by: hlleng <a909204013@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Link: https://lore.kernel.org/r/20250210114935.204309-1-a909204013@gmail.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpio-virtio.c