mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 21:02:43 +01:00
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 <[email protected]> Message-Id: <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
This commit is contained in:
1 parent
51ded7cdf2
commit
02213273f7
1 file changed
+3
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user