From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2A86C43461 for ; Fri, 9 Apr 2021 05:39:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B1BE861179 for ; Fri, 9 Apr 2021 05:39:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229905AbhDIFjh (ORCPT ); Fri, 9 Apr 2021 01:39:37 -0400 Received: from muru.com ([72.249.23.125]:52494 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbhDIFjh (ORCPT ); Fri, 9 Apr 2021 01:39:37 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 1BF1C80E7; Fri, 9 Apr 2021 05:40:32 +0000 (UTC) Date: Fri, 9 Apr 2021 08:39:18 +0300 From: Tony Lindgren To: Chunfeng Yun Cc: "Rafael J. Wysocki" , Rob Herring , Mathias Nyman , Greg Kroah-Hartman , Matthias Brugger , "Rafael J. Wysocki" , Len Brown , Pavel Machek , "open list:ULTRA-WIDEBAND (UWB) SUBSYSTEM:" , Linux ARM , "moderated list:ARM/Mediatek SoC..." , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List , Linux PM , Tianping Fang , Eddie Hung , Ikjoon Jang , Nicolas Boichat Subject: Re: [PATCH 1/6] PM: runtime: enable wake irq after runtime_suspend hook called Message-ID: References: <1617874514-12282-1-git-send-email-chunfeng.yun@mediatek.com> <1617933211.12105.22.camel@mhfsdcap03> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1617933211.12105.22.camel@mhfsdcap03> Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org * Chunfeng Yun [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 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. Regards, Tony