Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5991174rwp; Mon, 17 Jul 2023 12:55:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlETwNAfeySyjHe363pgtY2cQtPkQUeDj0mxOkQm1MfTt5T5Pp6dPUGzUD7fN2DnvSh6GjF5 X-Received: by 2002:a17:902:e887:b0:1af:981b:eeff with SMTP id w7-20020a170902e88700b001af981beeffmr14420394plg.64.1689623742793; Mon, 17 Jul 2023 12:55:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689623742; cv=none; d=google.com; s=arc-20160816; b=RYQ+kS0Od2b4WD+2tntH3llK91EJ3aJUFgqyp3gFB6k6eMFobX5Wc2b82loK+Pm/2p c5kwzF1H2Dy5PyrPPM3RW8whMiIhtJHVS+IL8iVX18GAkFyN1EAvugi85Zih4Q+Q6oAY IJJ6EwIKSz0BqbqsCUG6JZcLozm7RVXcttrkRH/n4KFyJ44a6660GEM5193AKl3ins1J sy8Rd+2xoC/L+DJLeLukiJxx9UeJ4Uqs8NM7ZYXIN68ftOKWiSX2XcEtij+LtiHGAzQc VDzTmKdekAowisfDfNw+xWtzGvQ9FNegYi+22COxyxom9rViAkRcN+gccUV/SfHyO24J ntjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=gYQ8MaDMGhvh5jrKhzRgcfiYyE0M1SG6+4azBMBqudI=; fh=L9EiziJgSO5pr/FZ/c0Y8ag3gsUqVyxA5siqfsOkXYw=; b=Au910Bh9QH5zBXUfeSx2rE5L8jWjppp8gkSjfQVCOtJJjnZpR5r+k0TpaaD+QFDhjg BVrTMK5dP2oyxSLjCPKMLPrnyh5AqGfLRzvPe7ENaNTgXye1GD5U2UHU16kHZj6ynZmB I2DIrJRwogLU+gq2Z188pVc2fb7JJeAOcEIJ02C29WhQsdAoKgTgLydxHJeoHMc6i1Z0 xbRSaXaMvZ7K+JcNEB3X3cJFZ4VMJGRmdoqjMhLAI1ItWKhCxdeEs5GEXDe42pos1CUQ Ep1BNEaRF0THivL8mMxszt3pPNASd2aQ8a5wtoiqSujgVLquh7YKZxf3egVRDzgAmCC6 umwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=CmYsV+OU; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b5-20020a170902650500b001b02e8d8976si348575plk.300.2023.07.17.12.55.30; Mon, 17 Jul 2023 12:55:42 -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=@gmail.com header.s=20221208 header.b=CmYsV+OU; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231351AbjGQTe3 (ORCPT + 99 others); Mon, 17 Jul 2023 15:34:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231302AbjGQTe0 (ORCPT ); Mon, 17 Jul 2023 15:34:26 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED9839D; Mon, 17 Jul 2023 12:34:25 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-991fe70f21bso662605266b.3; Mon, 17 Jul 2023 12:34:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689622464; x=1692214464; 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=gYQ8MaDMGhvh5jrKhzRgcfiYyE0M1SG6+4azBMBqudI=; b=CmYsV+OUNE6OWix7qWg2NF9ksb+D4FwJEZz5BB5Bt/eEtlbnBpWxzX1hjxX7GWMqbP QBss3SAYbf08ZGFzeGlGu8svA+436HShSfeRePvPl/5SsV4Fi73RrXgNqWoj/5aAHE+n CSqV+P/yUXwSn/vt9QkACzC/YZqH/RF4Va2KFecfDefZJ1WQtq4cOWU0H5x1WXjQAXaf X9btZnmo+RiAnZHQWN0shbzijTaFo7v1aF8zdleQKC3A7KRH+fDuqbGpdfDBIhfSpKuY DdyLGY2oKZR3HC1qyeUtfB1POtC2MdmqdDR6cz0tcGI7drepjmRZnwDYY8bZV67pILK5 vbBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689622464; x=1692214464; 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=gYQ8MaDMGhvh5jrKhzRgcfiYyE0M1SG6+4azBMBqudI=; b=RGNTGhrRbyqN/XlOa3fJJLuRG3ieYjYizO8wXAGAQosG2GvwBctVNhKTcLgQmcwsHH mnlOJDWP+RUgoJhw+IgwB7huVioNKLGN5TVK3c5OLrinQgQZR+Jj9FLUOLjffGVnle7J efQ+e4eKij5KY5tNoL+WVNRjP1L7ioQfVc9M29Is12PQhSOLJvRPX/9R/5FyuctQGt0A iBQIklwvddVynXK3BkF+LplZ+EzyYtoNIBC2stGr40ZgP5n24pbi7tJaETGgmc7/KuxQ Z5yVuAmbFZfzqro+Z62ifRYdm0EB1ouQPzm0lulpD7PEV1emR4MOhvD+ffEw8H/7Cjbc zALw== X-Gm-Message-State: ABy/qLaDp+uwwlg0U8fRGzlL8Rv5HjV+huHKn3C6+GfIEGRw6A+noX27 mkw0WzqxzX/EeFom3ltIAKJ4eWZkYgu/WgoztTE= X-Received: by 2002:a17:906:841:b0:991:cfce:7a09 with SMTP id f1-20020a170906084100b00991cfce7a09mr9440149ejd.67.1689622464190; Mon, 17 Jul 2023 12:34:24 -0700 (PDT) MIME-Version: 1.0 References: <20230717172821.62827-1-andriy.shevchenko@linux.intel.com> <20230717172821.62827-5-andriy.shevchenko@linux.intel.com> In-Reply-To: From: Andy Shevchenko Date: Mon, 17 Jul 2023 22:33:47 +0300 Message-ID: Subject: Re: [PATCH v2 04/10] pinctrl: intel: Switch to use DEFINE_NOIRQ_DEV_PM_OPS() helper To: Paul Cercueil Cc: Andy Shevchenko , Mika Westerberg , Linus Walleij , Balsam CHIHI , Claudiu Beznea , Geert Uytterhoeven , Wolfram Sang , Thierry Reding , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Mon, Jul 17, 2023 at 10:02=E2=80=AFPM Paul Cercueil wrote: > Le lundi 17 juillet 2023 =C3=A0 20:28 +0300, Andy Shevchenko a =C3=A9crit= : ... > Unrelated change. OK. ... > So the correct way to update this driver would be to have a > conditionally-exported dev_pm_ops structure: > > EXPORT_GPL_DEV_PM_OPS(intel_pinctrl_pm_ops) =3D { > NOIRQ_SYSTEM_SLEEP_PM_OPS(intel_pinctrl_suspend_noirq, > intel_pinctrl_resume_noirq), > }; This looks ugly. I didn't know that EXPORT*PM_OPS designed that way, but it seems pm.h in such case needs EXPORT for NOIRQ case as well. > Then your two callbacks can be "static" and without #ifdef guards. > > The resulting "intel_pinctrl_pm_ops" can be marked as "extern" in the > pinctrl-intel.h without any guards, as long as it is only referenced > with the pm_ptr() macro. I'm not sure I got this. Currently drivers do not have any guards. Moreover, the correct one for noirq is pm_sleep_ptr(), isn't it? --=20 With Best Regards, Andy Shevchenko