From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio <linux-iio@vger.kernel.org>,
Paul Cercueil <paul@crapouillou.net>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Biju Das <biju.das.jz@bp.renesas.com>,
Geert Uytterhoeven <geert+renesas@glider.be>
Subject: Re: [PATCH] iio: adc: rzg2l: Use RUNTIME_PM_OPS() instead of SET_*
Date: Mon, 8 Aug 2022 11:34:23 +0200 [thread overview]
Message-ID: <CAHp75VfFGUQevM3skOF_wSxSvTTUy98KCDqyOXUhBLpZ6-g4UQ@mail.gmail.com> (raw)
In-Reply-To: <20220807190712.1039403-1-jic23@kernel.org>
On Sun, Aug 7, 2022 at 9:11 PM Jonathan Cameron <jic23@kernel.org> wrote:
>
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> Here we could use DEFINE_RUNTIME_DEV_PM_OPS() but that would have the
> side effect of providing suspend and resume support. That would be
> harmless but also of little purpose as this driver does very simplistic
> power management with synchronous power up and down around individual
> channel reads.
>
> In general these new PM macros avoid the need to mark functions
> __maybe_unused, whilst still allowing the compiler to remove them
> if they are unused.
...
> static const struct dev_pm_ops rzg2l_adc_pm_ops = {
> - SET_RUNTIME_PM_OPS(rzg2l_adc_pm_runtime_suspend,
> - rzg2l_adc_pm_runtime_resume,
> - NULL)
> + RUNTIME_PM_OPS(rzg2l_adc_pm_runtime_suspend,
> + rzg2l_adc_pm_runtime_resume,
> + NULL)
> };
DEFINE_RUNTIME_DEV_PM_OPS() ?
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2022-08-08 9:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-07 19:07 [PATCH] iio: adc: rzg2l: Use RUNTIME_PM_OPS() instead of SET_* Jonathan Cameron
2022-08-08 9:34 ` Andy Shevchenko [this message]
2022-08-13 16:13 ` Jonathan Cameron
2022-08-14 19:12 ` Andy Shevchenko
2022-08-20 11:40 ` Jonathan Cameron
2023-01-28 18:06 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHp75VfFGUQevM3skOF_wSxSvTTUy98KCDqyOXUhBLpZ6-g4UQ@mail.gmail.com \
--to=andy.shevchenko@gmail.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=geert+renesas@glider.be \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=paul@crapouillou.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).