Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp2063458lqp; Tue, 16 Apr 2024 06:31:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUGFVuKPhl6WqaMANvJFckNrGGeSufBRoFYQ+WUoeJ1JvDKmImCQqIZCFoyVJUwuc90PR+IyRwQcU4pM6mxtchCq3kjGhCKRSnRxeeMDQ== X-Google-Smtp-Source: AGHT+IEFUXhSUmaAYOgXu4GuGbip7afrHqqya4fBH3x6gF82VLAbl+qtSwp5JMHfwNJCxkahgWom X-Received: by 2002:a05:6512:3885:b0:515:845f:6008 with SMTP id n5-20020a056512388500b00515845f6008mr9414294lft.57.1713274285466; Tue, 16 Apr 2024 06:31:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713274285; cv=pass; d=google.com; s=arc-20160816; b=B/CJHj9fMmM1yxjhe18yeOcT3e0duigfhkA6lPjJdG+eaD6a0OAJH6TvUO8hsrI/Fo IEzhjttgp6DS5ojRNCkHtv3XGdg3x2gr5+5lWtyL3+95QNaXihF7ttGHswrzoStiADpB lAruQOKrAmHC4VtINpOlTWuhtmu5jfIxL9Xxaypw65VhgnNWRX2DFQkefw7r/1EhJvUu LSfKr0MtVBzreHPk6n4G5C3IWNwxhLmDDeQEDIRtH/v5XkTlfwB/Dc1MlJ3VoGBg1arA ne2g46SDgf0Q8jx6RYd9fnIkJiCzY6oylmhvqU0upwxl2rhuXSrc9xN66L0hoaicpxlp N66w== 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=Wvb5fuLvthKnRqJS+jvbnbkaNojW0L1GsKXcy8jviXJYo7dLvymGXOGw3RS7eyK5RY eDRxxd91/pJUd79SaHJUK8P8YbQmnHlxBYy9rDwEMvQjPl1UzKEjF1oHBXvakB1L1QpR ugvkgpYO3vQybB/uDfwvs7KYAJ/gwApYnlcnqp5KISv7fW32QRsFA9Ls6sd7U8F637Jn T5gAEgvdTiIU/UsM2bJxQ2Y8lQ2VmxUz+EnQdBUS3N0XqVAjlTxPMPqQq76b/jWgBbw5 7CtGtbgPIsxXOOyQ2JjtzogmF3r/BFzFrdG747msFWFOMMYZk8LLKCW1CBkgip/cLdIa 57Sw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=m44ZOLO8; 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-146882-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146882-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 7-20020a508e47000000b0056b9023d0cbsi5774831edx.522.2024.04.16.06.31.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 06:31:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-146882-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=m44ZOLO8; 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-146882-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146882-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 0AF7D1F21823 for ; Tue, 16 Apr 2024 13:31:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8AC4F12DD95; Tue, 16 Apr 2024 13:30:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="m44ZOLO8" 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 5083E12C81A; Tue, 16 Apr 2024 13:30:17 +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=1713274221; cv=none; b=QKWN2RBhAvG4w1sYqU+QB5g+KWjA1oqOg4oNcIVkhjLm2hOVXN1+EliDrXS7FFumWjEOLEhRR/HHubHlK+2Qt+hfNflTG5XTni6e6ulu4pUSOMMTnqMg2VNhXAA1eSK8IHDVoURRmFiDiDDl4k2piLeLyLxCHxP8xwRbKYjs0nw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713274221; c=relaxed/simple; bh=OyHx7ZZ4/h8Wstp56SurooyJvSWdHdopw96/iRKHd8A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Od2lqEdOcvf/jYrrXaD0WuXEaIUE66zubp+HfyXw1Om55heur/fiJvGjMKzd4qUov+fdMp3JpkTPTuQwtXn4IWlxuirbi7coGhZvPJpDh5YSJpp4qEoxbS1+JLN5jXxHUXBIkt9ff1Dr7dJ+xp3K1D/6kkfDpDbC95ENpu41ZlY= 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=m44ZOLO8; 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 2679640002; Tue, 16 Apr 2024 13:30:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1713274211; 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=m44ZOLO8xpcdJKizGaKX1WggODNsjt4un2hjLuEjhmbR32wlPqG9/kESbGgqe1D8HsirO5 vExlvHjUeYcOGMMcn5A+lbgOnDdiCcoC04YoQb0EXPyLXy687m5LybeYJq9cu4xTEF2GVU qieBPBlBCnELs3pn9ET5ATWQIlopmHncoMqx2TXGEEFOyBal6O0S99COZ5LCh+ALIo7dlc JmoF2mpk5cZ8xcz13AHNe7aNb52Egf1FVPScQbCjWPOMGSKfJ7L1iHaVpCQWq8AfFD38pc 6TY1MWkdzzHF4yGmmUhhZjGGTMfiZnIu0KdntxUzWon0p+S/NtmHGusiI2RZ1w== From: Thomas Richard Date: Tue, 16 Apr 2024 15:29:50 +0200 Subject: [PATCH v5 01/11] 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-v5-1-4b8c46711ded@bootlin.com> References: <20240102-j7200-pcie-s2r-v5-0-4b8c46711ded@bootlin.com> In-Reply-To: <20240102-j7200-pcie-s2r-v5-0-4b8c46711ded@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