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@xxxxxxxxxxxxxxx with the > maintainer "Rob Herring <robh+dt@xxxxxxxxxx>" on Cc. Add the virtio list > virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx 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@xxxxxxxxxxx> > > > --- > > > 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 > > >