From patchwork Fri Jan 26 14:36:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Richard X-Patchwork-Id: 13532717 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 C8C7FC47422 for ; Fri, 26 Jan 2024 14:37:56 +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=1AUHcJmpwoZFTcUlXceu2Lf6oJTlTvlGiDTFGtN+wK0=; b=QWPYA5VXcnH4S+ sY0fJXhKLBLU/RWubfPQR1nN49f2A+nSea4W2mDaIXKFuLbpy5vuGHfFoKYnam8RWXbnWjuCCBHfG X8eDcOj/witp83QznI0asjJecgpJRzfICtJT7+AJ5ZgCCsx3kL1rCSehLObd5HNG27qzFbIAGnK2w HJaeDM3bzuyBIDh+CDGRMhDo7VuxxJ0Qfljt0Cn1+hZabbNDBAHV0ozEgCVza0CYr4iGlVrzcxncZ NnXBFdIUVwVcRI7O/Dg0R3fHA0coqqmz52WLNOTd4n7eOXUU8rerA6Ble4cuj65pklq9DXRGt8RLi obPVpAcMJHMWLhS2c3wg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTNL0-00000004MzJ-18bZ; Fri, 26 Jan 2024 14:37:46 +0000 Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTNKp-00000004Msz-33dU; Fri, 26 Jan 2024 14:37:37 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id D48BD40010; Fri, 26 Jan 2024 14:37:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1706279854; 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=UeT42sEpDDYGcpf5YrXoKh3jtRRClLytLS9mk4kxR3s=; b=QeD+UINS/zyJVUS478SNFmS/cAWoK6t9gopcTzrs5nJYkpqEUtEvkahDp7Vc5PIPAQBQI+ Dnw0MvCHZlPJ4wDUiqAGUgN2QReYkr5W+fx9cYu7BuYJAYCJ8KPAdaFBRELUGFbYgIaGe7 rDS/Awtg1g8wuh/+xpjgb1yMR3WhaSLEeqqeXRQU8WgMdVzepnDLESUlgcTLrgrIkIAiuV 9BIj+isUeaxYUTYAB9O/sqtXDAyPI7O+VlXojO7xSLrHrg0B07UD6fxYI+GK3KX2BUHjix KgPxn9S7mfQOKMiDtTc0IiTESa5jDd+dWvrAzP2ftvTRvWTE2/0vMD19UByEcg== From: Thomas Richard Date: Fri, 26 Jan 2024 15:36:43 +0100 Subject: [PATCH v2 01/15] gpio: pca953x: move suspend()/resume() to suspend_noirq()/resume_noirq() MIME-Version: 1.0 Message-Id: <20240102-j7200-pcie-s2r-v2-1-8e4f7d228ec2@bootlin.com> References: <20240102-j7200-pcie-s2r-v2-0-8e4f7d228ec2@bootlin.com> In-Reply-To: <20240102-j7200-pcie-s2r-v2-0-8e4f7d228ec2@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 , Tom Joseph , 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 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-20240126_063735_935810_177BBF58 X-CRM114-Status: UNSURE ( 9.84 ) 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. Signed-off-by: Thomas Richard Reviewed-by: Andy Shevchenko Acked-by: Bartosz Golaszewski Reviewed-by: Andi Shyti --- 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))