Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp395867rdb; Thu, 8 Feb 2024 08:54:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IFtn5ST6W0beMDE9JhET1/7Hnlkqk2fLtbC5aoYvjCRjJiaKfdi1QxT6KmkDUsIlCrxCywq X-Received: by 2002:ac8:5dc6:0:b0:42c:b95:838a with SMTP id e6-20020ac85dc6000000b0042c0b95838amr10963812qtx.67.1707411256452; Thu, 08 Feb 2024 08:54:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707411256; cv=pass; d=google.com; s=arc-20160816; b=uC096I9YzKdp2DzK0FFtKBco92szzP+ocf6uAszVj8aC9NXG6jqefUzdHyFOV3ZNzc feWkr02/Hrc4o5nkOFD4Won7pFLA+8RMqCYtxvyJhp2JpvtRc7KNYvS/aUAg4eOIu0/X QdxUb/9VuZpK6NYh+tSlgUOisVCKumL13mDB8OC4oW19kur2DdxGyW1wsVQXLK9c2Zy5 0fUI3nFa3M4lbl/q0aC2yMxV/JYXuUugZ+522cNuDt7rjoi+x8Oe5P0z8lKTFsx6HMBF 4BBg9zansxU3fVtBywHoDYxHF5C/KAd2/CvGKXaW9LDNvLhJiLqSW8B7+wszAsn/nzXL rgrg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=+WnqOpqwrKMN/Ii8lvXs8Tih6LFYmoJMhLY7pjgCWgA=; fh=tGyCPNEIDiiFnZAlUEjxABhWz45rwHsH4C/pD7o7FDs=; b=jb8+b0XVSFKeNtLIy19SJN89lxcoVoYOc2Z9cAtyH9zgO7MBEAxOR4D3ectpUrvx66 GypOk6zUdKQ5AsGhVDq48Z8xEE/BJ4oBXMevoUARVhcSxQm9AFetYjdhEABwP5w1rXKt 3nWqgTN7D0FFnjHa9FLfS2v2572NlbwZKf7rd+KE5rnj/IvzLbxQZYHrFdKjBwqj3zBQ j3ZbWb8ZebNO0dLaHe6f1I0Z1b16qQedZc0znRpCE6tYIc6wWLcC4PDXYcqSuI4prB9u f5L4+ftC1aK8sYVcXvuUnNUAMpyERS2rUU+hlwRS4PlFzWT6b9XYxn3Ic9zLvMWEW0Gt bEWw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=ybhq7Kd4; arc=pass (i=1 dkim=pass dkdomain=bgdev-pl.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-58383-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58383-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCXl4da9Fx7Y8byZ4YtuGkgcVLzEHj1HLiAmN8LMTNshZM2l0OdpVMc+CQMoHcTsHHO8WwTwqN8OMjGtnf8jjtwgoWtQnZxGAZaEzNhbPA== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g14-20020ac87d0e000000b0042c3be69e97si441451qtb.151.2024.02.08.08.54.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 08:54:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58383-linux.lists.archive=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=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=ybhq7Kd4; arc=pass (i=1 dkim=pass dkdomain=bgdev-pl.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-58383-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58383-linux.lists.archive=gmail.com@vger.kernel.org" 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 2A33B1C24A38 for ; Thu, 8 Feb 2024 16:54:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6E3F87EF1C; Thu, 8 Feb 2024 16:54:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="ybhq7Kd4" Received: from mail-vk1-f178.google.com (mail-vk1-f178.google.com [209.85.221.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1554573164 for ; Thu, 8 Feb 2024 16:54:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707411244; cv=none; b=Z4uyFmEZJqg6AkqR9q5Fz8YTpt2f1hFySXRVospZFRkqpwP/FKuDjB6Q6P1uS+stDI3g4+wo7WawNWh2Q+ZxOYVqjli2kRhX9LER1QznP+mk1gwYRvpeClKDmCHAp4TQA8DNbpQsd42FGtplSK+uj4sf9PhTGYOJUtSkOzWkE3s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707411244; c=relaxed/simple; bh=+WnqOpqwrKMN/Ii8lvXs8Tih6LFYmoJMhLY7pjgCWgA=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=oQMzAwaFl8A8rfyJMzCe9IG6RG2BK5yK9xmDghTD1cCrepD/94OIhkpJQ4CCQVf9OCcii+85mBhKMLyOCBskOh96pAD2TdYo0Tk7GthwcY/xeOiYi7TeUvsxt0Nt2SrRFCFY4U88a84kNj+PZNnIXSroH5bCq3qqVNtvd9DbY0c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=ybhq7Kd4; arc=none smtp.client-ip=209.85.221.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Received: by mail-vk1-f178.google.com with SMTP id 71dfb90a1353d-4c02779e68cso720988e0c.3 for ; Thu, 08 Feb 2024 08:54:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1707411242; x=1708016042; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+WnqOpqwrKMN/Ii8lvXs8Tih6LFYmoJMhLY7pjgCWgA=; b=ybhq7Kd4EMNxKxmH4ppuNsp011IeTINhTWm2q7GuUWAv5EqZBIkATzyQ9VKsHy1R/A KoNAq5/5s9fWZdWz2IE4LwathQ79bUe8E4PRhfXAFm+Jwy01C5eoS5LXtfgsgqRDXfJP J+UmGtPyvWe9VPaqJeqUgqyWY8R0LtYHN/c2gnoXv4bs2qWlZNTAY6Irczsgi2MitD2c ZttpnCpa6Qs+GdkJYreRIgbblmOckIg/yEViEx29BV5Pip2kkZnpYFLGtCg8K989IzdA sXJuRd7Pqb1z0d1iTKQzilqo+71GswvYS3E4Pvk8FqkeocxGFcCSZVmWFxx96kgmdOYl cG7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707411242; x=1708016042; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+WnqOpqwrKMN/Ii8lvXs8Tih6LFYmoJMhLY7pjgCWgA=; b=GtbGQ4iJXWr9q6OlGCoetpFCcxOpl4IDEO9QxTJ9hr/lou4UkXf2mVKx2AGTcFzWsG R8C5+Xvs5OJAXp3j0LJu6MjpX5LruC1MdVYC6/7m8YUPeFjZ2k+xJ1LbTiFEuYLWbEd0 RIDEAR5gOCLvw07NkjH7sGHYPLnmfKNk+SH5sCreukY1FuVknGXqKLZU/HaMFZNZxh9q zKboceb+3sEj5/QSt7Av+mqpOibfDVJczFr1bqT+DdPqK0bOXxmFFsbTbW1cwIqAun3y FLCloJ0d+9MkUqrGyYY/O5GvefNf7jCMyM6YIvx5Obojw1I45PJjZCaKcROe3ZBmx1jj FJaA== X-Gm-Message-State: AOJu0YzxyK9pHEdwyJV5VVc4jasZ08hEqgy1W4TUkDbzaHWs57zKvPeY EZyuKzw4Wim2KIeap1f2ZVijOqo/TtLpo7RMwF3nJMoaBNzZlLWdobRrWc+obfNb2ZqkNLq473V jZQOF7+EwZuwQ9WVWwhd366emaj6nJwDUKPXkQQ== X-Received: by 2002:a1f:e681:0:b0:4c0:2416:6fc2 with SMTP id d123-20020a1fe681000000b004c024166fc2mr161766vkh.5.1707411241926; Thu, 08 Feb 2024 08:54:01 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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> <95032042-787e-494a-bad9-81b62653de52@bootlin.com> In-Reply-To: <95032042-787e-494a-bad9-81b62653de52@bootlin.com> From: Bartosz Golaszewski Date: Thu, 8 Feb 2024 17:53:50 +0100 Message-ID: Subject: Re: [PATCH 01/14] gpio: pca953x: move suspend/resume to suspend_noirq/resume_noirq To: Thomas Richard Cc: Linus Walleij , Tony Lindgren , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Feb 8, 2024 at 5:19=E2=80=AFPM Thomas Richard wrote: > > On 1/28/24 01:12, Linus Walleij wrote: > > On Fri, Jan 19, 2024 at 6:01=E2=80=AFPM 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 ? > I prefer a new property than calling of_machine_is_compatible(). Please do run it by the DT maintainers, I think it should be fine. Maybe even don't limit it to TI but make it a generic property. Bart > 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 >