Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'gpio-fixes-for-v5.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

- fix interrupts when replugging the device in gpio-dln2

- remove the arbitrary timeout on virtio requests from gpio-virtio

* tag 'gpio-fixes-for-v5.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
gpio: virtio: remove timeout
gpio: dln2: Fix interrupts when replugging the device

+10 -15
+9 -10
drivers/gpio/gpio-dln2.c
··· 46 46 struct dln2_gpio { 47 47 struct platform_device *pdev; 48 48 struct gpio_chip gpio; 49 + struct irq_chip irqchip; 49 50 50 51 /* 51 52 * Cache pin direction to save us one transfer, since the hardware has ··· 384 383 mutex_unlock(&dln2->irq_lock); 385 384 } 386 385 387 - static struct irq_chip dln2_gpio_irqchip = { 388 - .name = "dln2-irq", 389 - .irq_mask = dln2_irq_mask, 390 - .irq_unmask = dln2_irq_unmask, 391 - .irq_set_type = dln2_irq_set_type, 392 - .irq_bus_lock = dln2_irq_bus_lock, 393 - .irq_bus_sync_unlock = dln2_irq_bus_unlock, 394 - }; 395 - 396 386 static void dln2_gpio_event(struct platform_device *pdev, u16 echo, 397 387 const void *data, int len) 398 388 { ··· 465 473 dln2->gpio.direction_output = dln2_gpio_direction_output; 466 474 dln2->gpio.set_config = dln2_gpio_set_config; 467 475 476 + dln2->irqchip.name = "dln2-irq", 477 + dln2->irqchip.irq_mask = dln2_irq_mask, 478 + dln2->irqchip.irq_unmask = dln2_irq_unmask, 479 + dln2->irqchip.irq_set_type = dln2_irq_set_type, 480 + dln2->irqchip.irq_bus_lock = dln2_irq_bus_lock, 481 + dln2->irqchip.irq_bus_sync_unlock = dln2_irq_bus_unlock, 482 + 468 483 girq = &dln2->gpio.irq; 469 - girq->chip = &dln2_gpio_irqchip; 484 + girq->chip = &dln2->irqchip; 470 485 /* The event comes from the outside so no parent handler */ 471 486 girq->parent_handler = NULL; 472 487 girq->num_parents = 0;
+1 -5
drivers/gpio/gpio-virtio.c
··· 100 100 virtqueue_kick(vgpio->request_vq); 101 101 mutex_unlock(&vgpio->lock); 102 102 103 - if (!wait_for_completion_timeout(&line->completion, HZ)) { 104 - dev_err(dev, "GPIO operation timed out\n"); 105 - ret = -ETIMEDOUT; 106 - goto out; 107 - } 103 + wait_for_completion(&line->completion); 108 104 109 105 if (unlikely(res->status != VIRTIO_GPIO_STATUS_OK)) { 110 106 dev_err(dev, "GPIO request failed: %d\n", gpio);