Received: by 2002:a05:7412:8d09:b0:fa:4c10:6cad with SMTP id bj9csp58852rdb; Mon, 15 Jan 2024 12:04:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IGOjgsjzlMLKpYM6fAlCm3Z5VYRLfUkcSIg9LyPcDXun/xrC2EFFeL15SyYqU1jqvgnIWYE X-Received: by 2002:a92:c14c:0:b0:35f:daa6:6882 with SMTP id b12-20020a92c14c000000b0035fdaa66882mr7416530ilh.41.1705349044783; Mon, 15 Jan 2024 12:04:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705349044; cv=none; d=google.com; s=arc-20160816; b=ZFxumPKOWjNNgOuAfRlYNl5yaMgYolcSBkO5kRuoaDhSSwlHzx2To2W9zxOSZdzCwT rAVmfrmnzYVqmVkrKrFk5AHAuPRzEFW2xzGnRuv1pycjB+wxOENtwp/VApYWKqCu7NWF 0SGndeZbf5If4LKig6ZfdvqQnkap2iokZQ9y0wZcdk1t4tb2XEsiRvImM2kOff5RBYyv TRau5Dl/HXAJGo7tcKHieCbUfr4MZMbOCfS8RVAqeewiG51z/zGxkt8GYr0CbkE+RFmz oiRiy5qkvOPdT2q6WPS7FEj8k10v7Zw58F+i0mZuWsgar7oUUnQK76+2EUHxE6j+yLRc p45g== ARC-Message-Signature: i=1; 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=KVDZwcSSRqINqk5rdQ8K5ViWRDbW0wiTlckLdVZ4q7M=; fh=SwzX0tglQFYcPD71mvgbAwSYlQ5cQ3p+hpmdhIQdgbM=; b=hjr/pZwRBxzeUBcBVYDe+J9RNsBO0GPAR0Ky9m7tmYfTrCqeAVm07P13j6ZW1eGx7c AeYQhbUZrNsvBhnAj9Ww9ywUsIMNMiZUDAGLEj50GhsAjU6ywkaXC7EbeB97rKxINcv5 b/swvNav1szgVwHTIMJo5UEn7tjseu/Sjqz9MUNPs5/M1yFurcQ07BUV546HU7zRpcSh 3CEOeLuDdoJR0W1/WzYcKOp8k2qc37/wkfznFFgoB+D4ZFW1sevLQ4gb7L7qCqAcS1DI siWjv34a1ON4utnPloSyqHkDehI4yI4FBk0pLvJxxkY3wBFmGbsksEoUbLWIUYKoQMPO Gjdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=PHu8vTJP; spf=pass (google.com: domain of linux-kernel+bounces-26457-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26457-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id bw2-20020a056a02048200b005cd881447basi10876175pgb.652.2024.01.15.12.04.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 12:04:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-26457-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=PHu8vTJP; spf=pass (google.com: domain of linux-kernel+bounces-26457-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26457-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 6EF902835F4 for ; Mon, 15 Jan 2024 20:04:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 424D01A727; Mon, 15 Jan 2024 20:02:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PHu8vTJP" Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (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 009EF1A712; Mon, 15 Jan 2024 20:02:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a28cc85e6b5so1085481166b.1; Mon, 15 Jan 2024 12:02:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705348959; x=1705953759; 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=fv9XBLOpYPAupVH4VJlqIAgoTeB9qFyrwGApny5s9n4=; b=PHu8vTJPRE26Zt5pCNgDk+i5OJ1KW/fJ2GIvRZ5MTnZj3EQRhmOVYmcGhcLXD4lZ6K bRq/X4YELInOL3Th7K+zQXsMrVBjuxuWjofZOVQTB22J0dAAhQpxXj2pJSXDb5b092fn eUjp4sOqbzbN/Vx85hSZbAOtP6YF48oTg5gaTulmZyoLKra6zoLFE21qOuNo2B0TQzJx l12pRoWPmfLDURSf71+RSgU8K4ndWBMIHDNWUE4HuTb+FFh2eOJE94FSjWd6vXhWc/NQ 5nctcAi/tznlnUJQXFyhj7sha0tdPNS2jDuZ1geaHO/P6TUVxieuWwGJSOLIxhKxvADk GKDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705348959; x=1705953759; 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=fv9XBLOpYPAupVH4VJlqIAgoTeB9qFyrwGApny5s9n4=; b=UgguxIvuIzHcLGqM29HpTPMSjJw+D5b2i6z92ljHY57svtsDwOYMgBalFBYehURJkS UX8q0+C2SomysYELY38PXxTqg0jwep4G4wmjBLWRk4/lOkmQJZTTVgwYmOISb2NWS3Ij e1PvHzeRRPgQumHaFHekMtdOrnhMT0n5U97+BLVNBIrauCb4LxLK414lhCkuDg9vsYb9 PRGgUNn6IHabaEj9A+xlzwHJD2HDiApEegTMZoSlyrd9FTNcx1BmXc+JnzD+0Q+kHcj6 t3vIU7bZkouM7WW72lYyZcJjIboCWfSvwB4+ljF/2QHEidgG6Bga1lvZ3pSHSWpRgPLA CwSA== X-Gm-Message-State: AOJu0YwmNMapzYQDDzrao56vlmcVHzTi8rCaA7C9oaqk+qdrTN63XWoY WfIAjskIJ3VmsxtAdIHM5/8fV6X4jQm09j2YYeA= X-Received: by 2002:a17:906:b053:b0:a2a:7404:cf5d with SMTP id bj19-20020a170906b05300b00a2a7404cf5dmr2017687ejb.114.1705348959235; Mon, 15 Jan 2024 12:02:39 -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-2-84e55da52400@bootlin.com> In-Reply-To: <20240102-j7200-pcie-s2r-v1-2-84e55da52400@bootlin.com> From: Andy Shevchenko Date: Mon, 15 Jan 2024 22:02:01 +0200 Message-ID: Subject: Re: [PATCH 02/14] pinctrl: pinctrl-single: move suspend/resume to suspend_noirq/resume_noirq To: Thomas Richard Cc: 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 , 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 Mon, Jan 15, 2024 at 6:16=E2=80=AFPM Thomas Richard wrote: > > The goal is to extend the active period of pinctrl. > Some devices may need active pinctrl after suspend and/or before resume. > So move suspend/resume to suspend_noirq/resume_noirq to have active > pinctrl until suspend_noirq (included), and from resume_noirq > (included). ->...callback...() (Same comment I have given for the first patch) .. > struct pcs_device *pcs; > > - pcs =3D platform_get_drvdata(pdev); > + pcs =3D dev_get_drvdata(dev); > if (!pcs) > return -EINVAL; Drop dead code. This should be simple one line after your change. struct pcs_device *pcs =3D dev_get_drvdata(dev); .. > struct pcs_device *pcs; > > - pcs =3D platform_get_drvdata(pdev); > + pcs =3D dev_get_drvdata(dev); > if (!pcs) > return -EINVAL; Ditto. .. > +static const struct dev_pm_ops pinctrl_single_pm_ops =3D { > + SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pinctrl_single_suspend_noirq, > + pinctrl_single_resume_noirq) > +}; Use proper / modern macro. .. > #endif Why ifdeferry is needed (esp. taking into account pm_ptr() use below)? --=20 With Best Regards, Andy Shevchenko