Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp375729rdb; Thu, 8 Feb 2024 08:20:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWCoOQit066Yh7YKAtkT/wSIZdGs/duZJun/5Zk8RUMJjm8LrZUdvXQSMM9/pvc0GLPb82xIFZpDkmEWS2eMFvIlrwcxQXYPoDglhc7Kg== X-Google-Smtp-Source: AGHT+IG66VggoLZxXkmQZZJl2finvWeHNtxoZLXOpmL0DrcFxXd1Vj98S280Syhxw6IuNN4LEtQf X-Received: by 2002:a17:907:7845:b0:a39:d252:11a5 with SMTP id lb5-20020a170907784500b00a39d25211a5mr2404170ejc.62.1707409204469; Thu, 08 Feb 2024 08:20:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707409204; cv=pass; d=google.com; s=arc-20160816; b=zDP6RqML6Zi1IhUijhPJpPaXWrr59xcbwls43UCdjlqZbMdxwOlxEVHteVa3wotuFS 2twalEhBjl8EI0pg+5QTslhSxhZMWougteKoINdb5qloQAMF59HCYJMx2E07Cfp8pkXc RHku4rWMgc4H/7JgQy/kDnQmJjH9+9blh37ZWI3lUycLMttMjNU96mOCndIQKUOj1tJA wI8SRu/8oAQgBH0aYm5sVEcIdzMAl/AKrw6C86WuWOzmVFsGD4xN+TJF8LADwzGGqJY4 CscU4KQFvcp69MGz07IQT6komWVyWD3Wi1K0sPS1kbpyJx2gNFv4WBgVsqxcK7GzFICI aMqQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=U2TLPkr/TOdJMNowIWx3rjtlSXIwzGhq1RSaqhd7JXE=; fh=QgL+pzv4snfV2XeTf7/mdQpPt4taCfvcA+fDMJTqUxA=; b=jXjm7GUZTdhqbXTQvpgiy6AOz8XyUwK8dPWzD1iINTdmtVKQSjxCWLzStp595kAqab mT20QS6o8nBiYMamZFKyfZ3LU5B8GJ+NVRJ5MiyHFFI3I17elB5Nrk2eGrLU3hUzdDMr FxJw6STSjgyChV5cKj2i/OjPLnemJjpBG3cL4hyllvTJPcOTkSANICjvRIthoHmvoQg0 YkUoEk2Ec4q3ZEpCgnG+Z3IwuKk6hAUqBAixzFATCGS/PlH/w2MCYBp4HjKme68b4PVv g6NhFRmA6PQbPeNPW8Ywf7gN5oahlkrbulxxfqqqGV+xAyRhJ90ZIuS/3dgWGNDYZhYe 2vzw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=QNqfu+Sy; 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-58338-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58338-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com X-Forwarded-Encrypted: i=2; AJvYcCWsHXpZjzrywjPhGXYcGh3zo/HIuVTlYrcqXFCBGgn0LXva3S++bRlA+n2zLOcU8bkZaZqJXNiU8aaYDAb5MR9S8grY4IYHfS/RagPCvQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id lk8-20020a170906cb0800b00a36730b50acsi176271ejb.348.2024.02.08.08.20.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 08:20:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58338-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=QNqfu+Sy; 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-58338-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58338-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 3ABBA1F28F52 for ; Thu, 8 Feb 2024 16:20:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D3D947EF0C; Thu, 8 Feb 2024 16:19:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="QNqfu+Sy" 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 C00D87EEF8; Thu, 8 Feb 2024 16:19:35 +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=1707409179; cv=none; b=VLzcDaf9I19japxnwwOBSrQr+P8ty3KdVDPgWfyLSfjMYDa2mIU94duIVx0SlLGJbGgGHt6kNUKZ9m0hEkcLv0FUi91DrnfyVvFHy/rTOL5xMy2ampzSLYZYjoKEGaG6wmSP2DO0E1cExFahFzFLhbG2B+rv8jxy8OOZRrqgfJw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707409179; c=relaxed/simple; bh=VvSGNV6b13e7HPMqih9K802mDaoqJaDzuGfo7FTl4pk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=OHyUTYygUbpYb7FmfF/SFRfxOVta4A1S975ZOX0XFX5GGynlhcx8XdFT4EzsE/HV+jgZXGrqwn+J2rDp5pjv8PGukLojFeEebpxcF1BrapmZvLMfzJlbGsiVenLcCQiKc3ml97GVHztmADOm60J+VgYjUnxGcj59wSEz3GPOaNQ= 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=QNqfu+Sy; 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 1ECA340004; Thu, 8 Feb 2024 16:19:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1707409168; 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=U2TLPkr/TOdJMNowIWx3rjtlSXIwzGhq1RSaqhd7JXE=; b=QNqfu+SyJHYhyGlvwAZsb9NUhHgTVxE3ArJ09CQwC/vdWPX0zKeI6EiZWzY9kjfvj8COxc RbVvS+FPBwH6mVflj/a+xeG6nBzagrBVOnxsuU1P4ftNAozaKHz6E94P7KM+5I5Xt+irc2 wVoDH5jtXIVQgw7ZR3xpEG3vNPmPUv+EgoX/4Oq0rFASzSzplEiqpIioYDlta0lHCcr6DQ WXWQ8BNt0m5cWKAP8ne7CScpygoxdJgtMpDfKE6ZJMiuRBWU55NuCOj/AtC3kEzTZ/ZJRq Ie5Ym+Lj8MKHGPDFZBwc5YwnluGyQkVPvx03Mn35D4XW7GHaAPo7708x1Ks4VQ== Message-ID: <95032042-787e-494a-bad9-81b62653de52@bootlin.com> Date: Thu, 8 Feb 2024 17:19:25 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 01/14] gpio: pca953x: move suspend/resume to suspend_noirq/resume_noirq Content-Language: en-US To: Linus Walleij Cc: Tony Lindgren , Bartosz Golaszewski , Andy Shevchenko , 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=C5=84ski?= , Rob Herring , Bjorn Helgaas , 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 References: <20240102-j7200-pcie-s2r-v1-0-84e55da52400@bootlin.com> <20240102-j7200-pcie-s2r-v1-1-84e55da52400@bootlin.com> <20240116074333.GO5185@atomide.com> <31c42f08-7d5e-4b91-87e9-bfc7e2cfdefe@bootlin.com> From: Thomas Richard In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: thomas.richard@bootlin.com On 1/28/24 01:12, Linus Walleij wrote: > On Fri, Jan 19, 2024 at 6:01 PM Thomas Richard > wrote: >> On 1/16/24 08:43, Tony Lindgren wrote: >>> * Thomas Richard [240115 16:16]: >>>> Some IOs can be needed during suspend_noirq/resume_noirq. >>>> So move suspend/resume callbacks to noirq. >>> >>> So have you checked that the pca953x_save_context() and restore works >>> this way? There's i2c traffic and regulators may sleep.. I wonder if >>> you instead just need to leave gpio-pca953x enabled in some cases >>> instead? >>> >> >> Yes I tested it, and it works (with my setup). >> But this patch may have an impact for other people. >> How could I leave it enabled in some cases ? > > I guess you could define both pca953x_suspend() and > pca953x_suspend_noirq() and selectively bail out on one > path on some systems? Yes. What do you think if I use a property like for example "ti,pm-noirq" to select the right path ? Is a property relevant for this use case ? Regards, > > Worst case using if (of_machine_is_compatible("my,machine"))... > > Yours, > Linus Walleij -- Thomas Richard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com