Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp3206793lqo; Wed, 15 May 2024 03:02:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXM2G+jpwBTPxyt6kUg+0u9vA026YiT6hAe9MUY0BxBESVwETR4UccrRdUOlNdHO6aV3SwUFF3p4czSlyHN2FtG9N20DYswoGRq7gZrVA== X-Google-Smtp-Source: AGHT+IE5ZwGJSs6q0gwU+Fx8sNqHRYqpMKgVvvMTt1elnFsyG0sDEJiIC4aL2x0RsVtv3AGK+hJ5 X-Received: by 2002:ac2:4c55:0:b0:51b:cf34:a517 with SMTP id 2adb3069b0e04-5220fc7350bmr11943854e87.2.1715767369563; Wed, 15 May 2024 03:02:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715767369; cv=pass; d=google.com; s=arc-20160816; b=xQgjBIfhJFWPJesmP2v3sykzgcwiNUFpockgt4V8AL6qNoivkd5FAgXy1tpFhPhcUg qq9R8wrU+pVvAwZXVywpNDACorr/E9QzhKCbyQ9v8rOHq3dOkOu/i5oXcDp4fs+sQfMO gc/gtIGjBUljchlJn34RveycRstZRAd/wIzSbp6+Jjb36fyud2VZZItwOaWmT3tWw/re HPwOlGmeKxTWz46aNWAsQe2zWMZJ7SQm05tdLF6ivQTCCaR2eo/z7iNsVaoFiiw6LZgT Qns8GLkm0VCfANlKHQf0LNdWejYO4+NeADDqZThD4QxFUDLS1yJplrdUs/4ceSHph83C OJqg== 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=S70Ysmy7GOlawn6RWq9qzGyOkNk33BPaQBIqrV30L4w=; fh=DIm1C+OnCYPxAYXKqhZ+1UQkISmM+S386cEiZjnuP30=; b=xqF2341r+t7r5q7sCPR7QBaPI4jz+iBFNpspPoQDT3xw6aOjf+7s2HWaTAmhJDp+tr SUxZnadtKh8Ccs+SPmG0LXDiZ4AJR/GnsPPM6AyOooZ0rlH5qa4ykJBeTm9I+kjJF4sr eObnsIDrIHHhfTDvCPBasqDCe9IrMZamnEvse0df2aCCoeEIZ23v/PGkoc+w1h8Ukpm6 yO889A5g3NjmC8wS/X1PKJwGIli7yIFZ6kfcVLfjcj4tRh9oR6+NDYQ1ctW+2mUq+HiD D6V6qi+8BCHwf4+C90eDNo0ziNYBKkEfb51xPIdVGKp7uTkt3eH1PwlnfbnvBq/HZVwj 4EXw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=ZG0pN0SO; 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-179739-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179739-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a1794669fsi723218066b.153.2024.05.15.03.02.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 03:02:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179739-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=ZG0pN0SO; 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-179739-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179739-linux.lists.archive=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 90F351F249AF for ; Wed, 15 May 2024 10:02:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 920C065BB7; Wed, 15 May 2024 10:01:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="ZG0pN0SO" Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (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 3BDAA5A0E6; Wed, 15 May 2024 10:01:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715767294; cv=none; b=jWL8M+fKfcvbcUMrYQAFCtTxh0nTlkD/Mk2ww+seOUGW160xQBHh21GJBGGCCinng6ScWbFBJ6nDIu/bi+ZDS5N4Bq6m7/vu17bF3q5S6pnlbgM6EdTEh7gAnE5l5X/lT21QxRwN78wT/iZ0lNbLUh5RFmtEMc81oxUJYhFjiD8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715767294; c=relaxed/simple; bh=OyHx7ZZ4/h8Wstp56SurooyJvSWdHdopw96/iRKHd8A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KifevkzTKVQ/B4g+z5ULOBfcp761xWcOQBQNIOrBfvuNJqb6wxn2wmJ+ydcV700VHrfsromVwt6dQK3HpLAyVND8d0HDMTZSclZVjL6Vj97zhfKa/VLMmqPVS77QkXbcjkeaRJfQi5z/UTp0d5EMtdKu7DNIMar1x+ry1+wwyUw= 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=ZG0pN0SO; arc=none smtp.client-ip=217.70.183.201 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 D6A4A1BF20C; Wed, 15 May 2024 10:01:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1715767284; 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=S70Ysmy7GOlawn6RWq9qzGyOkNk33BPaQBIqrV30L4w=; b=ZG0pN0SONBScZC3Tldy9ZK2RqB2o5K0RnMRe8M+9VXCsnGD8oefDor/aUosKBtHG+yEoBA GzFKcouyWbZ8UqkYhf29VME8nYlyudj6z/2fDD70TFNcVgJNrRJNdm6xqeb+gIpW39dl2b r6ReX+vQEvLT3jwDjadST371AsyoF4B8R6Ai92Sx0O84dPIejzU6h6u9blFyW2LfiT+74G P3Q33YhidBiXEbWyTv9XHxSvowZvoUzFybehtGHspbEoaw+RmvvYXjLxxrrOqRnGs2c3CF 2ito0O8D2M1xC6aGud491WvMYKxgFjXZYBn/ZYC21FWGPG8i9r34HmsYL4fghQ== From: Thomas Richard Date: Wed, 15 May 2024 12:01:02 +0200 Subject: [PATCH v6 01/12] gpio: pca953x: move suspend()/resume() to suspend_noirq()/resume_noirq() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240102-j7200-pcie-s2r-v6-1-4656ef6e6d66@bootlin.com> References: <20240102-j7200-pcie-s2r-v6-0-4656ef6e6d66@bootlin.com> In-Reply-To: <20240102-j7200-pcie-s2r-v6-0-4656ef6e6d66@bootlin.com> To: Linus Walleij , Bartosz Golaszewski , Tony Lindgren , Aaro Koskinen , Janusz Krzysztofik , Vignesh R , Andi Shyti , Peter Rosin , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Siddharth Vadapalli Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-i2c@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.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 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 Reviewed-by: Linus Walleij Signed-off-by: Thomas Richard --- 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