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: 201588 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp489637dyb; Thu, 15 Feb 2024 07:49:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXI7uB9N69c+4cw3bod4s4ioZAwxnnn+kRN6WSJr/DpS1vuKivsUnuMxiuDFFH2zpc8wH4kuMkt17vyT2ELBkLo7hyU5w== X-Google-Smtp-Source: AGHT+IF4e8eaCWLpR1HC5Rb3PZI9RFE7r2pxU3QLnTbrd5ntUAgZiAicpgucgar9qYFHF8wQKJhE X-Received: by 2002:a17:902:d301:b0:1db:5eb9:1c93 with SMTP id b1-20020a170902d30100b001db5eb91c93mr1846052plc.28.1708012188641; Thu, 15 Feb 2024 07:49:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708012188; cv=pass; d=google.com; s=arc-20160816; b=kTsr5cugHFpL8ZG5Lj6ypk99xkARlKT3z2GXj/e+oCX64lF27LRnGiFUWnEy5ixtEJ zItIgFIttcTpZAy4lfSp6ecKY2g7/FV/MLIBOHhIBbP8QdOlwnN8SezczcslwoaQQgqt jk8D7LWnmw7h8417OzwW3aeGSISlVNMS89ijBuV8WmfzkGQRpBLQofu4DPX1tSy/F+VI EbCSS/PtZ2NhAG2v/Mw7fXpsPGZUXfBmBsaayS3fr4ste+O+qFO6Dt9J1UcZ2BoEMcu3 anWPtRJwjAo9A6euW5/0ra7zvD/T/RKpPL8QMh/4zpNxbMATqFpeLf87zrfbh/qs1zWf QvSQ== 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=hyF0yc35eBHz6J5ozV2PTcEtd5Ku7xNg8KIyrWR2Ppc=; fh=VrsRFtkD0hMWNKyj9pS5kb8sMdNdbsISh0SCB8JLgwo=; b=i2NM+g8nFq5eWARS2mf3u4DHXtIjsvBatvkhNp8YNKEEqjyDMORrBOWJU6jUXmB/xw 11cv+UDVjuaxtG4MagtHSV9Pt3uKYOSJtT970eESW04UJnNIlEY2STyk8Gj/RdHutyd7 JwSdvQydpLtje6OTG9qINtV34pEUnYcb3xbTyGLoiHp67iUHl78PPf2GOQ1DEvOxRVTi IESTxgbmbNN455bb5316nFkdyxosrrQCC+zMILR9LLZGaeYyoCMruj0SIPhHQBLvC4ED XOOEDExmJxfGoOuqaPqq723pfZuolohKj6VhGlJyebK17EyhRA3ceLRHOPaTjLI8Eucl mKQA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=mTIdkXRM; 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-67150-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67150-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id lm5-20020a170903298500b001d9e3c8e3d7si1317326plb.157.2024.02.15.07.49.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 07:49:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67150-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=mTIdkXRM; 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-67150-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67150-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 3A43FB2A450 for ; Thu, 15 Feb 2024 15:19:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A9CE3134744; Thu, 15 Feb 2024 15:18:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="mTIdkXRM" Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (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 BB5831754B; Thu, 15 Feb 2024 15:18:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708010288; cv=none; b=RLHBpKjE3NI54zlOGRE+EBUS1e9SmQkehHPuZIg2Epjmi4SfA7rcQ0gZ2vR7CMApMmUrBJ0RGV97xmpDqRkExTOlLoEgRKulcgA+AR0kAonXA4K3htLUSStF3hY3jLRqtW7ssvwjGHPd3xMib+hq2+KF4zOMzli1IpKuVg8y55E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708010288; c=relaxed/simple; bh=qG7Aih/dlI+jjqynJ8CwK6KPV3f2CPLL/GBb4pkvOTw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=sKKKa3XFxKQMck5WMxQ1HM/7Z4/CisrWtOXStWk2ajISosiPSKxrbQpAAKA+Kcaa8VnwVIPp2gRFJzw9HmZx9M6XVTmx3TZBwr2xjAFgJAMarHcinuUWM7bh0TJDkVvpN8rhi7pIz2CZhlBEfJuUJTq+ySFXqLKvFWPRvEWltoY= 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=mTIdkXRM; arc=none smtp.client-ip=217.70.183.193 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 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() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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=C5=84?= =?utf-8?q?ski?= , 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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790980588596527997 X-GMAIL-MSGID: 1790980588596527997 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))