diff options
author | Minghao Xue <quic_mingxue@quicinc.com> | 2022-06-10 10:58:27 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2022-08-11 10:06:38 +0200 |
commit | 02213273f72a43bad3a8e9c18595a2c74ee487e8 (patch) | |
tree | 88d6f040badf39c50ba40e8d42f40927df2407a7 /drivers/virtio/virtio_mmio.c | |
parent | dt-bindings: virtio: mmio: add optional wakeup-source property (diff) | |
download | linux-02213273f72a43bad3a8e9c18595a2c74ee487e8.tar.xz linux-02213273f72a43bad3a8e9c18595a2c74ee487e8.zip |
virtio_mmio: add support to set IRQ of a virtio device as wakeup source
According to virtio_mmio wakeup flag in device trees, set its IRQ
as wakeup source in virtqueue initialization.
Signed-off-by: Minghao Xue <quic_mingxue@quicinc.com>
Message-Id: <1654851507-13891-3-git-send-email-quic_mingxue@quicinc.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/virtio/virtio_mmio.c')
-rw-r--r-- | drivers/virtio/virtio_mmio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index 083ff1eb743d..945cb8fb60b6 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -487,6 +487,9 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned int nvqs, if (err) return err; + if (of_property_read_bool(vm_dev->pdev->dev.of_node, "wakeup-source")) + enable_irq_wake(irq); + for (i = 0; i < nvqs; ++i) { if (!names[i]) { vqs[i] = NULL; |