All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Tony Lindgren <tony@atomide.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
	"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>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Tianping Fang <tianping.fang@mediatek.com>,
	Eddie Hung <eddie.hung@mediatek.com>,
	Ikjoon Jang <ikjn@chromium.org>,
	Nicolas Boichat <drinkcat@chromium.org>
Subject: Re: [PATCH 1/6] PM: runtime: enable wake irq after runtime_suspend hook called
Date: Sat, 10 Apr 2021 09:44:21 +0800	[thread overview]
Message-ID: <1618019061.12105.48.camel@mhfsdcap03> (raw)
In-Reply-To: <CAJZ5v0ioobLt5aEm8TAcPKgJiL13OJ7KqTeJmcQCuVp8ALxBmw@mail.gmail.com>

On Fri, 2021-04-09 at 13:14 +0200, Rafael J. Wysocki wrote:
> On Fri, Apr 9, 2021 at 10:36 AM Chunfeng Yun <chunfeng.yun@mediatek.com> wrote:
> >
> > On Fri, 2021-04-09 at 08:39 +0300, Tony Lindgren wrote:
> > > * Chunfeng Yun <chunfeng.yun@mediatek.com> [210409 01:54]:
> > > > On Thu, 2021-04-08 at 19:41 +0200, Rafael J. Wysocki wrote:
> > > > > On Thu, Apr 8, 2021 at 11:35 AM Chunfeng Yun <chunfeng.yun@mediatek.com> wrote:
> > > > > >
> > > > > > When the dedicated wake irq is level trigger, enable it before
> > > > > > calling runtime_suspend, will trigger an interrupt.
> > > > > >
> > > > > > e.g.
> > > > > > for a low level trigger type, it's low level at running time (0),
> > > > > > and becomes high level when enters suspend (runtime_suspend (1) is
> > > > > > called), a wakeup signal at (2) make it become low level, wake irq
> > > > > > will be triggered.
> > > > > >
> > > > > >                 ------------------
> > > > > >                |           ^     ^|
> > > > > > ----------------           |     | --------------
> > > > > >  |<---(0)--->|<--(1)--|   (3)   (2)    (4)
> > > > > >
> > > > > > if we enable the wake irq before calling runtime_suspend during (0),
> > > > > > an interrupt will arise, it causes resume immediately;
> > > > >
> > > > > But that's necessary to avoid missing a wakeup interrupt, isn't it?
> > > > That's also what I worry about.
> > >
> > > Yeah sounds like this patch will lead into missed wakeirqs.
> > If miss level trigger wakeirqs, that means HW doesn't latch it? is it HW
> > limitation?
> 
> If it's level-triggered, it won't be missed, but then it is just
> pointless to suspend the device when wakeup is being signaled in the
> first place.
Got it
> 
> I'm not sure if I understand the underlying problem correctly.  Is it
> about addressing spurious wakeups?
In fact, it's default value is the same as the wakeup signal, maybe the
above case, using level trigger, should be avoided, it is not clear and
causes confusion, as Ikjoon and Tony suggested, using falling edge type
is better.

Thanks a lot




WARNING: multiple messages have this Message-ID (diff)
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Tony Lindgren <tony@atomide.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
	"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>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Tianping Fang <tianping.fang@mediatek.com>,
	Eddie Hung <eddie.hung@mediatek.com>,
	Ikjoon Jang <ikjn@chromium.org>,
	Nicolas Boichat <drinkcat@chromium.org>
Subject: Re: [PATCH 1/6] PM: runtime: enable wake irq after runtime_suspend hook called
Date: Sat, 10 Apr 2021 09:44:21 +0800	[thread overview]
Message-ID: <1618019061.12105.48.camel@mhfsdcap03> (raw)
In-Reply-To: <CAJZ5v0ioobLt5aEm8TAcPKgJiL13OJ7KqTeJmcQCuVp8ALxBmw@mail.gmail.com>

On Fri, 2021-04-09 at 13:14 +0200, Rafael J. Wysocki wrote:
> On Fri, Apr 9, 2021 at 10:36 AM Chunfeng Yun <chunfeng.yun@mediatek.com> wrote:
> >
> > On Fri, 2021-04-09 at 08:39 +0300, Tony Lindgren wrote:
> > > * Chunfeng Yun <chunfeng.yun@mediatek.com> [210409 01:54]:
> > > > On Thu, 2021-04-08 at 19:41 +0200, Rafael J. Wysocki wrote:
> > > > > On Thu, Apr 8, 2021 at 11:35 AM Chunfeng Yun <chunfeng.yun@mediatek.com> wrote:
> > > > > >
> > > > > > When the dedicated wake irq is level trigger, enable it before
> > > > > > calling runtime_suspend, will trigger an interrupt.
> > > > > >
> > > > > > e.g.
> > > > > > for a low level trigger type, it's low level at running time (0),
> > > > > > and becomes high level when enters suspend (runtime_suspend (1) is
> > > > > > called), a wakeup signal at (2) make it become low level, wake irq
> > > > > > will be triggered.
> > > > > >
> > > > > >                 ------------------
> > > > > >                |           ^     ^|
> > > > > > ----------------           |     | --------------
> > > > > >  |<---(0)--->|<--(1)--|   (3)   (2)    (4)
> > > > > >
> > > > > > if we enable the wake irq before calling runtime_suspend during (0),
> > > > > > an interrupt will arise, it causes resume immediately;
> > > > >
> > > > > But that's necessary to avoid missing a wakeup interrupt, isn't it?
> > > > That's also what I worry about.
> > >
> > > Yeah sounds like this patch will lead into missed wakeirqs.
> > If miss level trigger wakeirqs, that means HW doesn't latch it? is it HW
> > limitation?
> 
> If it's level-triggered, it won't be missed, but then it is just
> pointless to suspend the device when wakeup is being signaled in the
> first place.
Got it
> 
> I'm not sure if I understand the underlying problem correctly.  Is it
> about addressing spurious wakeups?
In fact, it's default value is the same as the wakeup signal, maybe the
above case, using level trigger, should be avoided, it is not clear and
causes confusion, as Ikjoon and Tony suggested, using falling edge type
is better.

Thanks a lot



_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Tony Lindgren <tony@atomide.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
	"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>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Tianping Fang <tianping.fang@mediatek.com>,
	Eddie Hung <eddie.hung@mediatek.com>,
	Ikjoon Jang <ikjn@chromium.org>,
	Nicolas Boichat <drinkcat@chromium.org>
Subject: Re: [PATCH 1/6] PM: runtime: enable wake irq after runtime_suspend hook called
Date: Sat, 10 Apr 2021 09:44:21 +0800	[thread overview]
Message-ID: <1618019061.12105.48.camel@mhfsdcap03> (raw)
In-Reply-To: <CAJZ5v0ioobLt5aEm8TAcPKgJiL13OJ7KqTeJmcQCuVp8ALxBmw@mail.gmail.com>

On Fri, 2021-04-09 at 13:14 +0200, Rafael J. Wysocki wrote:
> On Fri, Apr 9, 2021 at 10:36 AM Chunfeng Yun <chunfeng.yun@mediatek.com> wrote:
> >
> > On Fri, 2021-04-09 at 08:39 +0300, Tony Lindgren wrote:
> > > * Chunfeng Yun <chunfeng.yun@mediatek.com> [210409 01:54]:
> > > > On Thu, 2021-04-08 at 19:41 +0200, Rafael J. Wysocki wrote:
> > > > > On Thu, Apr 8, 2021 at 11:35 AM Chunfeng Yun <chunfeng.yun@mediatek.com> wrote:
> > > > > >
> > > > > > When the dedicated wake irq is level trigger, enable it before
> > > > > > calling runtime_suspend, will trigger an interrupt.
> > > > > >
> > > > > > e.g.
> > > > > > for a low level trigger type, it's low level at running time (0),
> > > > > > and becomes high level when enters suspend (runtime_suspend (1) is
> > > > > > called), a wakeup signal at (2) make it become low level, wake irq
> > > > > > will be triggered.
> > > > > >
> > > > > >                 ------------------
> > > > > >                |           ^     ^|
> > > > > > ----------------           |     | --------------
> > > > > >  |<---(0)--->|<--(1)--|   (3)   (2)    (4)
> > > > > >
> > > > > > if we enable the wake irq before calling runtime_suspend during (0),
> > > > > > an interrupt will arise, it causes resume immediately;
> > > > >
> > > > > But that's necessary to avoid missing a wakeup interrupt, isn't it?
> > > > That's also what I worry about.
> > >
> > > Yeah sounds like this patch will lead into missed wakeirqs.
> > If miss level trigger wakeirqs, that means HW doesn't latch it? is it HW
> > limitation?
> 
> If it's level-triggered, it won't be missed, but then it is just
> pointless to suspend the device when wakeup is being signaled in the
> first place.
Got it
> 
> I'm not sure if I understand the underlying problem correctly.  Is it
> about addressing spurious wakeups?
In fact, it's default value is the same as the wakeup signal, maybe the
above case, using level trigger, should be avoided, it is not clear and
causes confusion, as Ikjoon and Tony suggested, using falling edge type
is better.

Thanks a lot



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-04-10  1:44 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08  9:35 [PATCH 1/6] PM: runtime: enable wake irq after runtime_suspend hook called Chunfeng Yun
2021-04-08  9:35 ` Chunfeng Yun
2021-04-08  9:35 ` Chunfeng Yun
2021-04-08  9:35 ` [PATCH 2/6] usb: xhci-mtk: check return value in suspend/resume hooks Chunfeng Yun
2021-04-08  9:35   ` Chunfeng Yun
2021-04-08  9:35   ` Chunfeng Yun
2021-04-08  9:35 ` [PATCH 3/6] dt-bindings: usb: mtk-xhci: add wakeup interrupt Chunfeng Yun
2021-04-08  9:35   ` Chunfeng Yun
2021-04-08  9:35   ` Chunfeng Yun
2021-04-09 18:41   ` Rob Herring
2021-04-09 18:41     ` Rob Herring
2021-04-09 18:41     ` Rob Herring
2021-04-08  9:35 ` [PATCH 4/6] usb: xhci-mtk: add support runtime PM Chunfeng Yun
2021-04-08  9:35   ` Chunfeng Yun
2021-04-08  9:35   ` Chunfeng Yun
2021-04-08  9:51   ` Chunfeng Yun
2021-04-08  9:51     ` Chunfeng Yun
2021-04-08  9:51     ` Chunfeng Yun
2021-04-09  5:45   ` Ikjoon Jang
2021-04-09  5:45     ` Ikjoon Jang
2021-04-09  5:45     ` Ikjoon Jang
2021-04-09  8:54     ` Chunfeng Yun
2021-04-09  8:54       ` Chunfeng Yun
2021-04-09  8:54       ` Chunfeng Yun
2021-04-12  5:14       ` Ikjoon Jang
2021-04-12  5:14         ` Ikjoon Jang
2021-04-12  5:14         ` Ikjoon Jang
2021-04-13  3:35         ` Chunfeng Yun
2021-04-13  3:35           ` Chunfeng Yun
2021-04-13  3:35           ` Chunfeng Yun
2021-04-08  9:35 ` [PATCH 5/6] usb: xhci-mtk: use clock bulk to get clocks Chunfeng Yun
2021-04-08  9:35   ` Chunfeng Yun
2021-04-08  9:35   ` Chunfeng Yun
2021-04-08  9:35 ` [PATCH 6/6] usb: xhci-mtk: remove unused members Chunfeng Yun
2021-04-08  9:35   ` Chunfeng Yun
2021-04-08  9:35   ` Chunfeng Yun
2021-04-08 17:41 ` [PATCH 1/6] PM: runtime: enable wake irq after runtime_suspend hook called Rafael J. Wysocki
2021-04-08 17:41   ` Rafael J. Wysocki
2021-04-08 17:41   ` Rafael J. Wysocki
2021-04-09  1:53   ` Chunfeng Yun
2021-04-09  1:53     ` Chunfeng Yun
2021-04-09  1:53     ` Chunfeng Yun
2021-04-09  5:39     ` Tony Lindgren
2021-04-09  5:39       ` Tony Lindgren
2021-04-09  5:39       ` Tony Lindgren
2021-04-09  8:36       ` Chunfeng Yun
2021-04-09  8:36         ` Chunfeng Yun
2021-04-09  8:36         ` Chunfeng Yun
2021-04-09 11:14         ` Rafael J. Wysocki
2021-04-09 11:14           ` Rafael J. Wysocki
2021-04-09 11:14           ` Rafael J. Wysocki
2021-04-10  1:44           ` Chunfeng Yun [this message]
2021-04-10  1:44             ` Chunfeng Yun
2021-04-10  1:44             ` Chunfeng Yun
2021-04-09  5:32 ` Ikjoon Jang
2021-04-09  5:32   ` Ikjoon Jang
2021-04-09  5:32   ` Ikjoon Jang
2021-04-09  5:40   ` Tony Lindgren
2021-04-09  5:40     ` Tony Lindgren
2021-04-09  5:40     ` Tony Lindgren
2021-04-09  8:43   ` Chunfeng Yun
2021-04-09  8:43     ` Chunfeng Yun
2021-04-09  8:43     ` Chunfeng Yun

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=1618019061.12105.48.camel@mhfsdcap03 \
    --to=chunfeng.yun@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=drinkcat@chromium.org \
    --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 \
    --cc=robh+dt@kernel.org \
    --cc=tianping.fang@mediatek.com \
    --cc=tony@atomide.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.