[v2,01/15] gpio: pca953x: move suspend()/resume() to suspend_noirq()/resume_noirq()
Message ID | 20240102-j7200-pcie-s2r-v2-1-8e4f7d228ec2@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-40201-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:e09d:b0:103:945f:af90 with SMTP id gm29csp700814dyb; Fri, 26 Jan 2024 06:38:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IGruJbR+3pIR76lwsWs1p0f3kp3Cjc9/k/z1u712M02dUhWhVRs208AuGEkHNtdEDgMrpqP X-Received: by 2002:a0d:e803:0:b0:5f6:cfc3:f5a3 with SMTP id r3-20020a0de803000000b005f6cfc3f5a3mr2215205ywe.50.1706279935997; Fri, 26 Jan 2024 06:38:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706279935; cv=pass; d=google.com; s=arc-20160816; b=bHQIdmzYWOB8ZPB8LUvNRF89+3WjRwCockdCv9JPgjUWntU5HQb/Usign4Uq4QWlif Qf1cFU5CgZJ/Zr+8u+nInrWY/7Lhc9td7ClDn6DiT5EFTnzF1dyDKKJVJltZomnvZ1lU R9zyJ20OyVcyXJlxHZPhE0U+zC/crZplcgMT4xYF66jMl0ITC6z2xEomzvelHLLreZWZ mDwJ9G8+352dNJHlfKJ/Xna/d/odsd18Sy2uYCiOH6O5Qpzv5XnM98WzUA/bO2ylVYh/ L0WCLmf2peDJOE+Jrh8IwT7qkVxAba4q5cCj2wN1RyVtYTjxvrA7E0fVDBtbgP1txnOt BCtQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=UeT42sEpDDYGcpf5YrXoKh3jtRRClLytLS9mk4kxR3s=; fh=ihwxVJW8DyodhmdJo1IfhLUDNDWeXh+49SpWXYbpL2Y=; b=UT7kSLOR01CFoLR5mN9Q3aSIpzT5QZD0Q01XrEmIMIHlNWT5i34x634hC/IIq2/Eeh 5U1yOU7p8xaBWLc1J5k4TwfhgNVym6s58h1G57ZvWoy9eL+BdnrbOPDuGO7YBjHUuUTl sYzkj+1z3aWmZvtOtMJtibCMUfIT4DmWG3+zKUs4FknVEcLXJvlxoUXpML8RY60DBwMV 7JL7EEnX2nyQrg348lHWc8k7f8s5PVBRcScbeVBzHiK9odJhHbppNQ7BHXbG/JfNL7CY /Q0TQWIA6q2HMJfP4WjiMg6oZe2wDm9FZE6LwiIebUiEjvf5vMMlPrPkdr7FR2yK6o1M 5crw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=QeD+UINS; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-40201-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40201-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id w12-20020a05620a0e8c00b0078391fc99b9si1368825qkm.677.2024.01.26.06.38.55 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 06:38:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40201-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=QeD+UINS; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-40201-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40201-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C4DA11C2107B for <ouuuleilei@gmail.com>; Fri, 26 Jan 2024 14:38:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F6BC1D6A8; Fri, 26 Jan 2024 14:37:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="QeD+UINS" Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC3E21CD1A; Fri, 26 Jan 2024 14:37:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706279864; cv=none; b=AdQZ5x3eqNjl8A1s9gbLDs+NjGjZwYJetvckUMjdhbchGRKJR8FNeRWrig52yIG2OL/xnowUZZ2MMaxBFKho4KYFs7Qpq2TFiUOudUVjV9A08cTbl5/DrwmfFS6H8HBuOaYyb9RccXYN7BUdncHtkkOxn+48DV6Qbo+X/7/Kv+g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706279864; c=relaxed/simple; bh=BLC9y/pBFPu9WfpypKFGXfgo4cG5qrErXSPYt3f0ihE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kUjdWYr2QlTbc0PSc51GhSen+cEEO9g4f9f8UseUk7G0kOrkIl37tEVNh9V3iFamP8eazTscZ5u2FRqdmsEjhnmZEuzRF8WlosDUCojO9sjBcE8t/zIzg12xh7eQHNg8rmn+j0QEt8206q+qydO3iCvr2XOdxX0+1rRtRNYcYDI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=QeD+UINS; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com 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 <thomas.richard@bootlin.com> Date: Fri, 26 Jan 2024 15:36:43 +0100 Subject: [PATCH v2 01/15] gpio: pca953x: move suspend()/resume() to suspend_noirq()/resume_noirq() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 <linus.walleij@linaro.org>, Bartosz Golaszewski <brgl@bgdev.pl>, Andy Shevchenko <andy@kernel.org>, Tony Lindgren <tony@atomide.com>, Haojian Zhuang <haojian.zhuang@linaro.org>, Vignesh R <vigneshr@ti.com>, Aaro Koskinen <aaro.koskinen@iki.fi>, Janusz Krzysztofik <jmkrzyszt@gmail.com>, Andi Shyti <andi.shyti@kernel.org>, Peter Rosin <peda@axentia.se>, Vinod Koul <vkoul@kernel.org>, Kishon Vijay Abraham I <kishon@kernel.org>, Philipp Zabel <p.zabel@pengutronix.de>, Tom Joseph <tjoseph@cadence.com>, Lorenzo Pieralisi <lpieralisi@kernel.org>, =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= <kw@linux.com>, Rob Herring <robh@kernel.org>, Bjorn Helgaas <bhelgaas@google.com> 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 <thomas.richard@bootlin.com> X-Mailer: b4 0.12.0 X-GND-Sasl: thomas.richard@bootlin.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789164190133478602 X-GMAIL-MSGID: 1789164190133478602 |
Series |
Add suspend to ram support for PCIe on J7200
|
|
Commit Message
Thomas Richard
Jan. 26, 2024, 2:36 p.m. UTC
Some IOs can be needed during suspend_noirq()/resume_noirq().
So move suspend()/resume() to noirq.
Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
---
drivers/gpio/gpio-pca953x.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Comments
On Fri, Jan 26, 2024 at 4:37 PM Thomas Richard <thomas.richard@bootlin.com> wrote: > > Some IOs can be needed during suspend_noirq()/resume_noirq(). > So move suspend()/resume() to noirq. On the first glance the code is okay, but I haven't tested it on the platforms I have that use this chip. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
On Fri, Jan 26, 2024 at 3:37 PM Thomas Richard <thomas.richard@bootlin.com> wrote: > > Some IOs can be needed during suspend_noirq()/resume_noirq(). > So move suspend()/resume() to noirq. > > Signed-off-by: Thomas Richard <thomas.richard@bootlin.com> > --- > 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)) > > -- > 2.39.2 > Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Hi Thomas, On Fri, Jan 26, 2024 at 03:36:43PM +0100, Thomas Richard wrote: > Some IOs can be needed during suspend_noirq()/resume_noirq(). > So move suspend()/resume() to noirq. > > Signed-off-by: Thomas Richard <thomas.richard@bootlin.com> Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Thanks, Andi
* Thomas Richard <thomas.richard@bootlin.com> [240126 14:37]: > Some IOs can be needed during suspend_noirq()/resume_noirq(). > So move suspend()/resume() to noirq. Hmm so what happened to the earlier i2c transfer at noirq level comments from me and Linus W here? It seems the cover letter mentions it but I don't see the related changes in this patch? Regards, Tony
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))