From: Minghao Xue <quic_mingxue@quicinc.com>
To: Jean-Philippe Brucker <jean-philippe@linaro.org>
Cc: <mst@redhat.com>, <jasowang@redhat.com>, <quic_ztu@quicinc.com>,
<robh+dt@kernel.org>, <virtualization@lists.linux-foundation.org>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dt-bindings: virtio: mmio: add optional virtio,wakeup property
Date: Fri, 18 Mar 2022 10:10:52 +0800 [thread overview]
Message-ID: <20220318021052.GA16300@mingxue-gv.qualcomm.com> (raw)
In-Reply-To: <YjMJ32SFXTLCuaRY@myrica>
Hi Jean and folks,
This is just an optional flag which could be used on an embedded system.
For example, if we want to use an virtio-input device as a virtual power
key to wake up the virtual machine, we can set this flag in the device
tree.
Currently, virio-mmio driver does not implement suspend/resume
callback(maybe no need). So we want to check this flag and call
enable_irq_wake() accordingly in vm_find_vqs().
Regards,
Minghao
On Thu, Mar 17, 2022 at 10:13:51AM +0000, Jean-Philippe Brucker wrote:
> Hi Minghao,
>
> On Thu, Mar 17, 2022 at 02:35:15PM +0800, Minghao Xue wrote:
> > Hi Jean,
> >
> > Do you have any comment on this change? And do you consider to accpet
> > this commit? Looking forward to your reply.
>
> Please send device-tree patches to devicetree@vger.kernel.org with the
> maintainer "Rob Herring <robh+dt@kernel.org>" on Cc. Add the virtio list
> virtualization@lists.linux-foundation.org for anything related to virtio.
> (You can find that by running "scripts/get_maintainer.pl <your patch>")
>
> Regarding the patch itself it's outside my expertise, but I feel like
> there should be more generic mechanism to solve this problem, and firmware
> might not need to be involved if this is not describing a property of the
> platform. Plenty of drivers outside virtio deal with IRQ lines as wakeup
> source and I don't see similar properties in other device tree nodes, how
> do they do it? It looks like a lot of drivers call enable_irq_wake() in
> their suspend() callback, so could we do the same for virtio-mmio?
>
> Thanks,
> Jean
>
> >
> > Regards,
> > Minghao
> >
> > On Tue, Mar 08, 2022 at 05:52:36PM +0800, Minghao Xue wrote:
> > > Some systems want to set the interrupt of virtio_mmio device
> > > as a wakeup source. On such systems, we'll use the existence
> > > of the "virtio,wakeup" property as a signal of requirement.
> > >
> > > Signed-off-by: Minghao Xue <quic_mingxue@quicinc.com>
> > > ---
> > > Documentation/devicetree/bindings/virtio/mmio.yaml | 4 ++++
> > > 1 file changed, 4 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/virtio/mmio.yaml b/Documentation/devicetree/bindings/virtio/mmio.yaml
> > > index 4b7a027..a5fe02a 100644
> > > --- a/Documentation/devicetree/bindings/virtio/mmio.yaml
> > > +++ b/Documentation/devicetree/bindings/virtio/mmio.yaml
> > > @@ -31,6 +31,10 @@ properties:
> > > description: Required for devices making accesses thru an IOMMU.
> > > maxItems: 1
> > >
> > > + virtio,wakeup:
> > > + type: boolean
> > > + description: Required for setting irq of a virtio_mmio device as wakeup source.
> > > +
> > > required:
> > > - compatible
> > > - reg
> > > --
> > > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> > > a Linux Foundation Collaborative Project
> > >
next parent reply other threads:[~2022-03-18 2:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1646733156-19333-1-git-send-email-quic_mingxue@quicinc.com>
[not found] ` <20220317063515.GA30789@mingxue-gv.qualcomm.com>
[not found] ` <YjMJ32SFXTLCuaRY@myrica>
2022-03-18 2:10 ` Minghao Xue [this message]
2022-03-18 13:40 ` Krzysztof Kozlowski
2022-03-22 6:19 ` Minghao Xue
2022-03-22 8:38 ` Krzysztof Kozlowski
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=20220318021052.GA16300@mingxue-gv.qualcomm.com \
--to=quic_mingxue@quicinc.com \
--cc=devicetree@vger.kernel.org \
--cc=jasowang@redhat.com \
--cc=jean-philippe@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=quic_ztu@quicinc.com \
--cc=robh+dt@kernel.org \
--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®