gpio fixes for v5.16-rc7
- fix interrupts when replugging the device in gpio-dln2 - remove the arbitrary timeout on virtio requests from gpio-virtio -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmHEoTwACgkQEacuoBRx 13KXRg/6AuCCAEVFSZ545AmfDmLX26sAUPnxsWM/HOX1+hgH1wnL4H/y0EL2zZqM PYWkztJNmSIpJ6F232MztE+lJ4qr/3CWB8yHWNt3WK58NQlo4iISQTeRKHTnhHcu 8d4VeHmqCETfqkkv1/+Pg0/0bNsEvru5EfpqcE/ZrGrtzKWRLDKfmyyFiVHhCyrw Q5NK0LgPJuftv2EFuP4Y1LSv1VSANC1AkgG0Cxu8KKuNItIAtQp/+s/2FElFPpxQ wldnHP+0Kf3vBP790ANGXVtBaRhUQs8jkdlX1xioOieP/htV9ZP7jfKPubYf9kQU QMLtkPUJ4yzL5v/S2KGdyUSlGLui63GqnXPGZVQmRR2Dvcpfdb7EpsuL9PgCc7z5 XA/mWPX1tWrr+KDiHa2y/TTFoe0iU/zatojo9XqB7bB1XNF5Z0OXtiH1wUGbSV3T 4AaEafTNUT7negI9gZ3nu6kl/WRFde4fYt7RuA3irpHtFqoDFDu3iVkolyGsOHgU cP7nUCEkC2T27mRsKtKX+e+7hVo3uZ2L4MmISQ2kRWa324rHWXuHHVPArAjavozP /zIq81wzsX7U6dMuUD8APdyTgr/MSMGNuurK+C0iFKBjnnjUMoCjXzfywHuAX0gf UGvm4CIf7xCtpsdS8D7JHhT7fMPGzOW20t1+/QnQCate3Sg5h80= =qZzN -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
3bf6f01398
@ -46,6 +46,7 @@
|
||||
struct dln2_gpio {
|
||||
struct platform_device *pdev;
|
||||
struct gpio_chip gpio;
|
||||
struct irq_chip irqchip;
|
||||
|
||||
/*
|
||||
* Cache pin direction to save us one transfer, since the hardware has
|
||||
@ -383,15 +384,6 @@ static void dln2_irq_bus_unlock(struct irq_data *irqd)
|
||||
mutex_unlock(&dln2->irq_lock);
|
||||
}
|
||||
|
||||
static struct irq_chip dln2_gpio_irqchip = {
|
||||
.name = "dln2-irq",
|
||||
.irq_mask = dln2_irq_mask,
|
||||
.irq_unmask = dln2_irq_unmask,
|
||||
.irq_set_type = dln2_irq_set_type,
|
||||
.irq_bus_lock = dln2_irq_bus_lock,
|
||||
.irq_bus_sync_unlock = dln2_irq_bus_unlock,
|
||||
};
|
||||
|
||||
static void dln2_gpio_event(struct platform_device *pdev, u16 echo,
|
||||
const void *data, int len)
|
||||
{
|
||||
@ -473,8 +465,15 @@ static int dln2_gpio_probe(struct platform_device *pdev)
|
||||
dln2->gpio.direction_output = dln2_gpio_direction_output;
|
||||
dln2->gpio.set_config = dln2_gpio_set_config;
|
||||
|
||||
dln2->irqchip.name = "dln2-irq",
|
||||
dln2->irqchip.irq_mask = dln2_irq_mask,
|
||||
dln2->irqchip.irq_unmask = dln2_irq_unmask,
|
||||
dln2->irqchip.irq_set_type = dln2_irq_set_type,
|
||||
dln2->irqchip.irq_bus_lock = dln2_irq_bus_lock,
|
||||
dln2->irqchip.irq_bus_sync_unlock = dln2_irq_bus_unlock,
|
||||
|
||||
girq = &dln2->gpio.irq;
|
||||
girq->chip = &dln2_gpio_irqchip;
|
||||
girq->chip = &dln2->irqchip;
|
||||
/* The event comes from the outside so no parent handler */
|
||||
girq->parent_handler = NULL;
|
||||
girq->num_parents = 0;
|
||||
|
@ -100,11 +100,7 @@ static int _virtio_gpio_req(struct virtio_gpio *vgpio, u16 type, u16 gpio,
|
||||
virtqueue_kick(vgpio->request_vq);
|
||||
mutex_unlock(&vgpio->lock);
|
||||
|
||||
if (!wait_for_completion_timeout(&line->completion, HZ)) {
|
||||
dev_err(dev, "GPIO operation timed out\n");
|
||||
ret = -ETIMEDOUT;
|
||||
goto out;
|
||||
}
|
||||
wait_for_completion(&line->completion);
|
||||
|
||||
if (unlikely(res->status != VIRTIO_GPIO_STATUS_OK)) {
|
||||
dev_err(dev, "GPIO request failed: %d\n", gpio);
|
||||
|
Loading…
Reference in New Issue
Block a user