From patchwork Thu Feb 15 15:17:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Richard X-Patchwork-Id: 13558623 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 704B7C48BC4 for ; Thu, 15 Feb 2024 15:18:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ld1f6uuK/klZxMfZ4xeLhkUVjAwMMl3HvacI9KxANmU=; b=mmMiQoBM28KeCl agOO6dHho0elZhSby6VApZGnEo72Pm7M4NMKTK48C0v1FBMbTsDTOOby6eOulKpEpoM0zz7h8glyJ 8vgcySKk910AdDJh5meOkK6hvyYRE+RlRH4Z9VdZKBIGpPahplmjvlvF3Y+gdFUctKZjlNiUg+ejX aq/yUHNcFutp6UI+vypPH+YrdarU7cXwDLct3ljav05m0KCnyXgVKB0gWCgqiGc0TTR6juCbp2GJk Hviw5j0u84t6gfdj/7rJsgm11F704lkGA3rVivNq0DYWxslc5HBqdRtWjizFJVMPv1m2406SIiu/W twZUE5wPCZlzZVrTn+hQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1radV4-0000000Ggrk-1T81; Thu, 15 Feb 2024 15:18:10 +0000 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1radUy-0000000GgoY-1qrz; Thu, 15 Feb 2024 15:18:07 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 949FA240005; Thu, 15 Feb 2024 15:17:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708010280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hyF0yc35eBHz6J5ozV2PTcEtd5Ku7xNg8KIyrWR2Ppc=; b=mTIdkXRMUnc1Ncw1CWpsPwNllIyE5RWLeNrhM1TegKqa7oqfvKO/Fb10XiXCzERmNJAm5a DJRnqTUiopMwB+wrwWP3sLY6zMDgVKdm4t8K+sIb4rQILYECzSqDiy1a76l/mA/DuUKYEw OmkRRFfjY+3POb7TaLbNucl8alqGWRLtBYswCxalNLkoAZdOB+kgcQv44HuMZkBZZ96lIP gkIsc61gjI4l1hc1skr2UKj4en2dKzD1iuXh3gwbC/SjbTPR0NiIu0tgOlKRmK+tdCDWFy 6d/wPjybitM07zx/FEjIsX7BDsGLsyUtPIDxaEJR4joKe5HG/b9X73Wvq2kCjQ== From: Thomas Richard Date: Thu, 15 Feb 2024 16:17:46 +0100 Subject: [PATCH v3 01/18] gpio: pca953x: move suspend()/resume() to suspend_noirq()/resume_noirq() MIME-Version: 1.0 Message-Id: <20240102-j7200-pcie-s2r-v3-1-5c2e4a3fac1f@bootlin.com> References: <20240102-j7200-pcie-s2r-v3-0-5c2e4a3fac1f@bootlin.com> In-Reply-To: <20240102-j7200-pcie-s2r-v3-0-5c2e4a3fac1f@bootlin.com> To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Tony Lindgren , Haojian Zhuang , Vignesh R , Aaro Koskinen , Janusz Krzysztofik , Andi Shyti , Peter Rosin , Vinod Koul , Kishon Vijay Abraham I , Philipp Zabel , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy?= =?utf-8?q?=C5=84ski?= , Rob Herring , Bjorn Helgaas Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-i2c@vger.kernel.org, linux-phy@lists.infradead.org, linux-pci@vger.kernel.org, gregory.clement@bootlin.com, theo.lebrun@bootlin.com, thomas.petazzoni@bootlin.com, u-kumar1@ti.com, Thomas Richard , Bartosz Golaszewski , Andy Shevchenko X-Mailer: b4 0.12.0 X-GND-Sasl: thomas.richard@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240215_071804_801113_9D56A5E7 X-CRM114-Status: UNSURE ( 9.52 ) X-CRM114-Notice: Please train this message. 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 Some IOs can be needed during suspend_noirq()/resume_noirq(). So move suspend()/resume() to noirq. Reviewed-by: Andi Shyti Acked-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Signed-off-by: Thomas Richard Reviewed-by: Linus Walleij --- drivers/gpio/gpio-pca953x.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c index 00ffa168e405..6e495fc67a93 100644 --- a/drivers/gpio/gpio-pca953x.c +++ b/drivers/gpio/gpio-pca953x.c @@ -1234,7 +1234,7 @@ static void pca953x_save_context(struct pca953x_chip *chip) regcache_cache_only(chip->regmap, true); } -static int pca953x_suspend(struct device *dev) +static int pca953x_suspend_noirq(struct device *dev) { struct pca953x_chip *chip = dev_get_drvdata(dev); @@ -1248,7 +1248,7 @@ static int pca953x_suspend(struct device *dev) return 0; } -static int pca953x_resume(struct device *dev) +static int pca953x_resume_noirq(struct device *dev) { struct pca953x_chip *chip = dev_get_drvdata(dev); int ret; @@ -1268,7 +1268,8 @@ static int pca953x_resume(struct device *dev) return ret; } -static DEFINE_SIMPLE_DEV_PM_OPS(pca953x_pm_ops, pca953x_suspend, pca953x_resume); +static DEFINE_NOIRQ_DEV_PM_OPS(pca953x_pm_ops, + pca953x_suspend_noirq, pca953x_resume_noirq); /* convenience to stop overlong match-table lines */ #define OF_653X(__nrgpio, __int) ((void *)(__nrgpio | PCAL653X_TYPE | __int))