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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 27DAEE6FE2F for ; Fri, 6 Sep 2024 16:13:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=st1kODhvyTXk6TV1RcdKVdBXoGE9hcS/ZZYObHLT4cs=; b=bGOCOxg6Ey6fAXYD+rks60bkui MfLdhoYatAiTsL6TmNkBP+yjZ+stO3wqk1KCxlaCRajtUFKROG513lL1CwS3VulilmJROwvRvTJ+D lvGimYReZLtG5IFLr0Fuq0NziJQ+IzpPmmeuB4Y29lmAPvoofMsvXC1KbN0cKVcRlw+MJnCDrEVAb pTM83mcfLY03CmA1stOhvBlTRbu3B+nNAmt+YXbMEpN4E71A5XzqW+SkSGUMJjIABM9FwrJgFmwaA AXKht5h5NoBj55nncMUthLTAPIXmP/0aK5XmVg9mHPVKGGpVihzMukWRiXAf3mu4kT9zeEo45es08 il5m7ciA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smbaM-0000000Cu10-1j9n; Fri, 06 Sep 2024 16:13:22 +0000 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smbHU-0000000Cqnn-19AW for linux-arm-kernel@lists.infradead.org; Fri, 06 Sep 2024 15:53:54 +0000 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-206e614953aso15262835ad.1 for ; Fri, 06 Sep 2024 08:53:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1725638030; x=1726242830; darn=lists.infradead.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=st1kODhvyTXk6TV1RcdKVdBXoGE9hcS/ZZYObHLT4cs=; b=vje1cUI8yZMN9lgcQLF4uo2gQYqFz3uwRgw0KJBpcHRiph/MuHFd4ctFi39SSvtk5g dHbYuBA2IKUuKrH4KSRE652nZiHz1gn9s3nBl5+D0LnM7sIDuHNCpN7Cuk5CRK+Kxmx4 s0RdGPGEYBXbDr9VHivgvSQ07Nkz2CAlqR5z8zrVUYTqzuSyH5Iy2KlyC/Vjw8/2hvYf uhL35o4lchAGMIy+j0NV5bmIZNASiuxl4enxW28qpTbMn5EtEZqoG6XGOcoERcQwodfJ S/M7p0bK6DhKFpfaXip5DyS+7PsT/uevRoVq0EaDn+AkpqX63Eh6NbA8mFGDLRq/QklX fKoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725638030; x=1726242830; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=st1kODhvyTXk6TV1RcdKVdBXoGE9hcS/ZZYObHLT4cs=; b=HIaBjos+ZypI8/HacjTASQDpfDcbCS3SDzMxAYRaR5n385+mECR4VWBPI1/S0dkk0R 5PLqPIZXuZCR0cIBvK17AqURKBINAqAoVvNNXk9/hnhmb2bIcYcfu1CCVOVQo4V1QJBe WWSZZjOoIWTbyYDOflo6QG2ySbsjSlmMjMDqAN73QCJ2KSb/vNuQomnNN5QC5ODKc7jx 9gRmg2iG2ZkG9B2CSHJnLOKJEk1/6CVVBHRnqgb3UenHcDGJ96PDLMSwhQpKMmKz1hw5 wf8vSIV77J+m9D9gaO1Wb0iOhmxMz3A70+LVy9SXc65cUknYdcM2dm2H3aQRo/paXOlR VYIg== X-Forwarded-Encrypted: i=1; AJvYcCUbQGtLGrJ/4mT76htFyDiG/qRvtPPjgiBXEylyCx3AVUR0r9RqXB/Sy3Tm/LhVqom9Nhrk4ZHNp4AoE0pvsAto@lists.infradead.org X-Gm-Message-State: AOJu0YysW+ltwDBoF/VtMV8MI8n7geskXc8BYbtbq4tyD+P84pW2QJ29 c01HEOKzprhrFnX6RQzI0VIxKPgMY1EZ6+BkLpda3VEJX/ocMI5KiuX3i/R/HKU= X-Google-Smtp-Source: AGHT+IFw9PxcaxQ7+rDmkcLXn+siO6V9uqYxbdPNfcgdVRHimfqKWxh65K7oC05RbvA9mJZ5BZgqIA== X-Received: by 2002:a17:902:da90:b0:206:9060:c452 with SMTP id d9443c01a7336-2069060c57dmr180473135ad.33.1725638030419; Fri, 06 Sep 2024 08:53:50 -0700 (PDT) Received: from localhost ([71.212.170.185]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-206ae94dcc4sm44569565ad.67.2024.09.06.08.53.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 08:53:49 -0700 (PDT) From: Kevin Hilman To: Ulf Hansson Cc: linux-pm@vger.kernel.org, Nishanth Menon , Vibhore Vardhan , Dhruva Gole , Akashdeep Kaur , Sebin Francis , Markus Schneider-Pargmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/3] pmdomain: ti_sci: handle wake IRQs for IO daisy chain wakeups In-Reply-To: References: <20240905-lpm-v6-10-constraints-pmdomain-v3-0-e359cbb39654@baylibre.com> <20240905-lpm-v6-10-constraints-pmdomain-v3-3-e359cbb39654@baylibre.com> Date: Fri, 06 Sep 2024 08:53:49 -0700 Message-ID: <7hfrqcaicy.fsf@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240906_085352_445599_A7A7A78A X-CRM114-Status: GOOD ( 17.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Ulf Hansson writes: > On Fri, 6 Sept 2024 at 00:03, Kevin Hilman wrote: >> >> When a device supports IO daisy-chain wakeups, it uses a dedicated >> wake IRQ. Devices with IO daisy-chain wakeups enabled should not set >> wakeup constraints since these can happen even from deep power states, >> so should not prevent the DM from picking deep power states. >> >> Wake IRQs are set with dev_pm_set_wake_irq() or >> dev_pm_set_dedicated_wake_irq(). The latter is used by the serial >> driver used on K3 platforms (drivers/tty/serial/8250/8250_omap.c) >> when the interrupts-extended property is used to describe the >> dedicated wakeup interrupt. >> >> Detect these wake IRQs in the suspend path, and if set, skip sending >> constraint. >> >> Signed-off-by: Kevin Hilman >> --- >> drivers/pmdomain/ti/ti_sci_pm_domains.c | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c >> index 1ab1e46924ab..747a7a33c0a9 100644 >> --- a/drivers/pmdomain/ti/ti_sci_pm_domains.c >> +++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c >> @@ -82,6 +82,13 @@ static inline void ti_sci_pd_set_wkup_constraint(struct device *dev) >> int ret; >> >> if (device_may_wakeup(dev)) { >> + /* >> + * If device can wakeup using IO daisy chain wakeups, >> + * we do not want to set a constraint. >> + */ >> + if (dev->power.wakeirq) >> + dev_dbg(dev, "%s: has wake IRQ, not setting constraints\n", __func__); > > return; ? > Oops, I meant to remove the "false" return when changing from bool to void, but mistakenly removed the whole line. d'oh!, good catch. Thanks. Kevin