aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-virtio.c
Commit message (Collapse)AuthorAgeFilesLines
* gpio: virtio: support multiple virtio-gpio controller instanceshlleng2025-02-111-14/+15
| | | | | | | | | | | | | | | | | 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 <[email protected]> Acked-by: Viresh Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
* virtio: rename virtio_find_vqs_info() to virtio_find_vqs()Jiri Pirko2024-07-171-2/+2
| | | | | | | | | Since the original virtio_find_vqs() is no longer present, rename virtio_find_vqs_info() back to virtio_find_vqs(). Signed-off-by: Jiri Pirko <[email protected]> Message-Id: <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
* virtio: convert the rest virtio_find_vqs() users to virtio_find_vqs_info()Jiri Pirko2024-07-171-5/+5
| | | | | | | | | | | Instead of passing separate names and callbacks arrays to virtio_find_vqs(), have one of virtual_queue_info structs and pass it to virtio_find_vqs_info(). Suggested-by: Xuan Zhuo <[email protected]> Signed-off-by: Jiri Pirko <[email protected]> Message-Id: <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
* gpio: virtio: drop owner assignmentKrzysztof Kozlowski2024-05-221-1/+0
| | | | | | | | | | | virtio core already sets the .owner, so driver does not need to. Acked-by: Bartosz Golaszewski <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Krzysztof Kozlowski <[email protected]> Message-Id: <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Acked-by: Linus Walleij <[email protected]>
* virtio: wrap config->reset callsMichael S. Tsirkin2022-01-141-1/+1
| | | | | | | | | | | This will enable cleanups down the road. The idea is to disable cbs, then add "flush_queued_cbs" callback as a parameter, this way drivers can flush any work queued after callbacks have been disabled. Signed-off-by: Michael S. Tsirkin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michael S. Tsirkin <[email protected]>
* gpio: virtio: remove timeoutVincent Whitchurch2021-12-211-5/+1
| | | | | | | | | | | | | The driver imposes an arbitrary one second timeout on virtio requests, but the specification doesn't prevent the virtio device from taking longer to process requests, so remove this timeout to support all systems and device implementations. Fixes: 3a29355a22c0275fe86 ("gpio: Add virtio-gpio driver") Signed-off-by: Vincent Whitchurch <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
* gpio: virtio: remove unneeded semicolonYang Li2021-11-151-1/+1
| | | | | | | | | | Eliminate the following coccicheck warning: ./drivers/gpio/gpio-virtio.c:437:2-3: Unneeded semicolon Reported-by: Abaci Robot <[email protected]> Signed-off-by: Yang Li <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
* gpio: virtio: Add IRQ supportViresh Kumar2021-11-041-4/+298
| | | | | | | | | | | This patch adds IRQ support for the virtio GPIO driver. Note that this uses the irq_bus_lock/unlock() callbacks, since those operations over virtio may sleep. Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Viresh Kumar <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
* gpio: virtio: Fix sparse warningsViresh Kumar2021-08-311-21/+20
| | | | | | | | | | | Fix warnings reported by sparse, related to type mismatch between u16 and __le16. Reported-by: kernel test robot <[email protected]> Fixes: 3a29355a22c0 ("gpio: Add virtio-gpio driver") Signed-off-by: Viresh Kumar <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
* gpio: Add virtio-gpio driverViresh Kumar2021-08-231-0/+375
This patch adds a new driver for Virtio based GPIO devices. This allows a guest VM running Linux to access GPIO lines provided by the host. It supports all basic operations, except interrupts for the GPIO lines. Based on the initial work posted by: "Enrico Weigelt, metux IT consult" <[email protected]>. Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Viresh Kumar <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>