Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6562418rwp; Tue, 18 Jul 2023 02:17:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlHDYIATaqwInaYle8SDpSkHZtIlTmusu2fW2XJaGC1F+5tqcp04kvJK5vtC50rdKVmasEOc X-Received: by 2002:a05:6a20:9383:b0:12e:4d86:c017 with SMTP id x3-20020a056a20938300b0012e4d86c017mr17282846pzh.10.1689671836785; Tue, 18 Jul 2023 02:17:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689671836; cv=none; d=google.com; s=arc-20160816; b=FXga6K160+gMSBdKyxhD5yub/n+GJ9rn4TOZupU9Uy5YewflJyxGB1iJzfoei/7UVM oql46iPfs2P0Lv+6upC+uL0Mle8LZn+dC25zbAJ/S3HSHt9QR7BvdgPZHeQbrXCx/tOg SnK2a8G7wFqd5eaGcqmXCoLQz3SkaSuC4iaqGuj0J8wcGA7Vqjl/O3nqA+x8quzBtJjo qBbDnH7otCUGWzIKyjpZkCbgC3bEtJPCmqbx09DMrC/Py7EC0/eyHxu5t/WNlxxdSney ot90KwC5wcPeBuFrzcpCg0vk/TxJbrRbQ3EXFk25FE8xA05JbsRxlb2tKS9bl1SII/+E IuHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=lvBHRW1hX7jSHUc5Dd1yf8Vt754q3/Qv7wxhKNRg9lU=; fh=9B5y/k/P1yVMvWn/dPkBs8Pz+rpiI1PPkOIeASbKyyY=; b=tGbcqlWbA10g6zkQ/GKdKve6bZMMkCsR7OqLZzeL2wt/B3eaBU/sgTHBHUk3qfkklJ 0P2WKprr2skJzDGubNX+OH+Vwiy6lLdHhBfmHXYeOOe2heBVCH42AlIRMo4OhR1V+K0m 92CYEsZSwF6jdQyz4zci0SMyj73YfI1dXrfTzkTQr50wNP0Oay8WEaS5E2rmL+brZ68Q EGD2B3g+YW7lVNEgnRW0BmfuAyKc1AN3/j64KZSdi3VR386aqEQ2JWNzXNWN4NAgf5/O CeMWV5EGs15AX3cpYQjIjAuSbsu+jzPhWOrWci1hUoaXsQsFiMxe/VKS9yH2AlQOXI7q Edgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=maEuuMJ2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t2-20020a63f342000000b0055ba5bb0bd4si1227997pgj.776.2023.07.18.02.17.04; Tue, 18 Jul 2023 02:17:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=maEuuMJ2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231995AbjGRInQ (ORCPT + 99 others); Tue, 18 Jul 2023 04:43:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232030AbjGRIm7 (ORCPT ); Tue, 18 Jul 2023 04:42:59 -0400 Received: from aposti.net (aposti.net [89.234.176.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B77F1A6; Tue, 18 Jul 2023 01:42:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1689669770; 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=lvBHRW1hX7jSHUc5Dd1yf8Vt754q3/Qv7wxhKNRg9lU=; b=maEuuMJ23VwXgPP1BYNWDWH9FoDi8ssbRkcHwVHdHZ+2liVDNNtSFXoi/Ucm7tD8fFcWkz Y1+1pyzlgXX8KdYt9Wa7GKYCY48VbAbD6BnoH3PHwrKdfGz5uVVGeT1MlJH1yeEkON6JDi BIcoju3Ka9xM3kidK/COzZ4sCOkXIp0= Message-ID: <5e4b5bc23f3edb3ed30cb465420a51ffceceb53d.camel@crapouillou.net> Subject: Re: [PATCH v2 10/10] pinctrl: tegra: Switch to use DEFINE_NOIRQ_DEV_PM_OPS() helper From: Paul Cercueil To: Thierry Reding Cc: Andy Shevchenko , Mika Westerberg , Linus Walleij , Balsam CHIHI , Claudiu Beznea , Geert Uytterhoeven , Wolfram Sang , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org, Andy Shevchenko , Sean Wang , Matthias Brugger , AngeloGioacchino Del Regno , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Ludovic Desroches , Nicolas Ferre , Alexandre Belloni , Jonathan Hunter , "Rafael J. Wysocki" , Len Brown , Pavel Machek Date: Tue, 18 Jul 2023 10:42:47 +0200 In-Reply-To: References: <20230717172821.62827-1-andriy.shevchenko@linux.intel.com> <20230717172821.62827-11-andriy.shevchenko@linux.intel.com> <13f7153786cfcdc3c6185a3a674686f7fbf480dc.camel@crapouillou.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thierry, Le mardi 18 juillet 2023 =C3=A0 09:45 +0200, Thierry Reding a =C3=A9crit=C2= =A0: > On Mon, Jul 17, 2023 at 09:14:12PM +0200, Paul Cercueil wrote: > > Hi Andy, > >=20 > > Le lundi 17 juillet 2023 =C3=A0 20:28 +0300, Andy Shevchenko a =C3=A9cr= it=C2=A0: > > > Since pm.h provides a helper for system no-IRQ PM callbacks, > > > switch the driver to use it instead of open coded variant. > > >=20 > > > Signed-off-by: Andy Shevchenko > > > > > > --- > > > =C2=A0drivers/pinctrl/tegra/pinctrl-tegra.c | 5 +---- > > > =C2=A01 file changed, 1 insertion(+), 4 deletions(-) > > >=20 > > > diff --git a/drivers/pinctrl/tegra/pinctrl-tegra.c > > > b/drivers/pinctrl/tegra/pinctrl-tegra.c > > > index 4547cf66d03b..734c71ef005b 100644 > > > --- a/drivers/pinctrl/tegra/pinctrl-tegra.c > > > +++ b/drivers/pinctrl/tegra/pinctrl-tegra.c > > > @@ -747,10 +747,7 @@ static int tegra_pinctrl_resume(struct > > > device > > > *dev) > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return 0; > > > =C2=A0} > > > =C2=A0 > > > -const struct dev_pm_ops tegra_pinctrl_pm =3D { > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0.suspend_noirq =3D &tegra_= pinctrl_suspend, > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0.resume_noirq =3D &tegra_p= inctrl_resume > > > -}; > > > +DEFINE_NOIRQ_DEV_PM_OPS(tegra_pinctrl_pm, tegra_pinctrl_suspend, > > > tegra_pinctrl_resume); > > > =C2=A0 > > > =C2=A0static bool tegra_pinctrl_gpio_node_has_range(struct tegra_pmx > > > *pmx) > > > =C2=A0{ > >=20 > > Another driver where using EXPORT_GPL_DEV_PM_OPS() would make more > > sense. >=20 > We don't currently export these PM ops because none of the Tegra > pinctrl > drivers can be built as a module. This doesn't change anything. You'd want to use EXPORT_GPL_DEV_PM_OPS (or better, the namespaced version) so that the PM ops can be defined in one file and referenced in another, while still having them garbage- collected when CONFIG_PM is disabled. Cheers, -Paul