From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Pavel Machek <pavel@ucw.cz>, Len Brown <len.brown@intel.com>,
Mathias Nyman <mathias.nyman@intel.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
Linux PM <linux-pm@vger.kernel.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"open list:ULTRA-WIDEBAND (UWB) SUBSYSTEM:"
<linux-usb@vger.kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
"moderated list:ARM/Mediatek SoC..."
<linux-mediatek@lists.infradead.org>,
Eddie Hung <eddie.hung@mediatek.com>,
Ikjoon Jang <ikjn@chromium.org>
Subject: Re: [PATCH v3 1/2] PM / wakeirq: support enabling wake-up irq after runtime_suspend called
Date: Sat, 23 Oct 2021 15:07:12 +0800 [thread overview]
Message-ID: <ab177213e7aa808b3803cac46146d96a02724425.camel@mediatek.com> (raw)
In-Reply-To: <df145215a21b67b440405736d9628199ccce2a1b.camel@mediatek.com>
On Sat, 2021-10-23 at 14:35 +0800, Chunfeng Yun wrote:
> On Tue, 2021-10-19 at 17:28 +0200, Rafael J. Wysocki wrote:
> > On Wed, Aug 11, 2021 at 5:05 AM Chunfeng Yun <
> > chunfeng.yun@mediatek.com> wrote:
> > >
> > > When the dedicated wake-irq is level trigger, and it uses the
> > > consumer's sleep status as the wakeup source, that means if the
> > > consumer is not in sleep state, the wake-irq will be triggered
> > > when enable it; For this case, need enable the wake-irq after
> > > invoking the consumer's runtime_suspend() which make the consumer
> > > enter sleep state.
> > [...]
>
> If want to make it static, should move it from wakeirq.c into
> runtime.c
>
> >
> > > {
> > > struct wake_irq *wirq = dev->power.wakeirq;
> > >
> > > if (!wirq || !(wirq->status & WAKE_IRQ_DEDICATED_MASK))
> > > return;
> >
> > And I would just add the following line here:
> >
> > if (cond_disable && (wirq->status &
> > WAKE_IRQ_DEDICATED_LATE_ENABLED))
> > return;
>
> This change doesn't cover the case (WAKE_IRQ_DEDICATED_LATE_ENABLED
> and
> WAKE_IRQ_DEDICATED_MANAGED are both set 1):
>
> -->rpm_suspend(): wirq->irq is enabled
> -->rpm_resume(): disable wirq->irq; (if change it, doesn't disable
> wirq->irq)
Seems I'm wrong, check again.
>
> >
> > >
> > > - if (wirq->status & WAKE_IRQ_DEDICATED_MANAGED)
> > > + if (wirq->status & WAKE_IRQ_DEDICATED_MANAGED &&
> > > + (skip_late_enabled_status ||
> > > + !(wirq->status & WAKE_IRQ_DEDICATED_LATE_ENABLED)))
> > > disable_irq_nosync(wirq->irq);
> > > }
> > >
> > > +/**
> > > + * dev_pm_enable_wake_irq_complete - enable wake irq based on
> > > status
> >
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2021-10-23 7:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-11 3:04 [PATCH v3 1/2] PM / wakeirq: support enabling wake-up irq after runtime_suspend called Chunfeng Yun
2021-08-11 3:04 ` [PATCH v3 2/2] usb: xhci-mtk: enable wake-up interrupt " Chunfeng Yun
2021-10-19 15:28 ` [PATCH v3 1/2] PM / wakeirq: support enabling wake-up irq " Rafael J. Wysocki
2021-10-23 6:35 ` Chunfeng Yun
2021-10-23 7:07 ` Chunfeng Yun [this message]
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=ab177213e7aa808b3803cac46146d96a02724425.camel@mediatek.com \
--to=chunfeng.yun@mediatek.com \
--cc=eddie.hung@mediatek.com \
--cc=gregkh@linuxfoundation.org \
--cc=ikjn@chromium.org \
--cc=len.brown@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=matthias.bgg@gmail.com \
--cc=pavel@ucw.cz \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
/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;
as well as URLs for NNTP newsgroup(s).