Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a3cdd45 authored by Minghao Xue's avatar Minghao Xue
Browse files

virtio_mmio: add support to set a virtio device as wakeup source



According to virtio_mmio wakeup flag in device trees, set its IRQ
as wakeup source in virtqueue initialization.

Change-Id: Id861bf10d475c66bcb343dbbb01ba143338dd18c
Signed-off-by: default avatarMinghao Xue <mingxue@codeaurora.org>
parent 38b1718d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -476,6 +476,9 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs,
	if (err)
		return err;

	if (of_property_read_bool(vm_dev->pdev->dev.of_node, "virtio,wakeup"))
		enable_irq_wake(irq);

	for (i = 0; i < nvqs; ++i) {
		if (!names[i]) {
			vqs[i] = NULL;