From: Minghao Xue <quic_mingxue@quicinc.com>
To: <mst@redhat.com>, <jasowang@redhat.com>,
<virtualization@lists.linux-foundation.org>,
<linux-kernel@vger.kernel.org>
Cc: <quic_ztu@quicinc.com>
Subject: [PATCH v2 2/2] virtio_mmio: add support to set IRQ of a virtio device as wakeup source
Date: Fri, 25 Mar 2022 10:05:49 +0800 [thread overview]
Message-ID: <20220325020549.GA17663@mingxue-gv.qualcomm.com> (raw)
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>
---
v1 -> v2: rename property from "virtio,wakeup" to "wakeup-source"
drivers/virtio/virtio_mmio.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 56128b9..6637d85 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -474,6 +474,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, "wakeup-source"))
+ enable_irq_wake(irq);
+
for (i = 0; i < nvqs; ++i) {
if (!names[i]) {
vqs[i] = NULL;
--
2.7.4
next reply other threads:[~2022-03-25 2:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-25 2:05 Minghao Xue [this message]
2022-06-10 8:58 [PATCH v2 0/2] " Minghao Xue
2022-06-10 8:58 ` [PATCH v2 2/2] " Minghao Xue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220325020549.GA17663@mingxue-gv.qualcomm.com \
--to=quic_mingxue@quicinc.com \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=quic_ztu@quicinc.com \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®