From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Crt Mori <cmo@melexis.com>, Jonathan Cameron <jic23@kernel.org>,
linux-iio <linux-iio@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/3] iio: temperature: mlx90632 Add runtime powermanagement modes
Date: Thu, 8 Sep 2022 13:43:19 +0100 [thread overview]
Message-ID: <20220908134319.00005f59@huawei.com> (raw)
In-Reply-To: <CAHp75VcAhDPLyS=f07qVyiUY_Bh-ZrovWcajn2UkugQt=OCNNQ@mail.gmail.com>
On Tue, 6 Sep 2022 16:16:07 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> On Tue, Sep 6, 2022 at 4:04 PM Crt Mori <cmo@melexis.com> wrote:
> > On Tue, 6 Sept 2022 at 14:37, Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> > > On Tue, Sep 6, 2022 at 1:52 PM Crt Mori <cmo@melexis.com> wrote:
> > > > On Tue, 6 Sept 2022 at 12:21, Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> > > > >
> > > > > Very good and documented code, thanks!
> > > > > I believe you better to use DEFINE_.*_PM_OPS instead of legacy ones
> > > > > (due to pm_ptr() usage).
> > > > > Otherwise, with some nitpicks that wouldn't prevent a green light,
> > > > > Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> > > > >
> > > > I checked DEFINE_.*_PM_OPS usage around drivers and you either have
> > > > SIMPLE (where you define suspend/resume) or you have RUNTIME (for
> > > > runtime suspend/resume), but never are those two together. So I am a
> > > > bit puzzled how to get this working.
> > >
> > > The one which suits here is called _DEFINE_DEV_PM_OPS(). But it's
> > > basically the same what you put here with the possible unused case.
> > >
> > I thought underscore prefixed macros are the ones not to be used
> > directly by drivers. I also found no occurrence in current drivers, so
> > it was not something that was done so far?
>
> Looks like... Okay, then let's leave it to the maintainer to decide.
>
Indeed. Discussion ended up at right place. Don't use _DEFINE_DEV_PM_OPS()
in a driver. The solution here is correct as is.
As a side note, I think _DEFINE_DEV_PM_OPS() is getting removed or redefined
as part of tidying up the missing EXPORT_* cases. (I'm too lazy to find the
patch set but it was for mfd drivers).
Jonathan
next prev parent reply other threads:[~2022-09-08 12:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-06 9:06 [PATCH v3 0/3] iio: temperature: mlx90632: Add powermanagement cmo
2022-09-06 9:04 ` [PATCH v3 1/3] iio: temperature: mlx90632 Add runtime powermanagement modes cmo
2022-09-06 10:20 ` Andy Shevchenko
2022-09-06 10:51 ` Crt Mori
2022-09-06 12:36 ` Andy Shevchenko
2022-09-06 13:04 ` Crt Mori
2022-09-06 13:16 ` Andy Shevchenko
2022-09-08 12:43 ` Jonathan Cameron [this message]
2022-09-15 14:07 ` Jonathan Cameron
2022-09-15 14:35 ` Crt Mori
2022-09-16 15:22 ` Jonathan Cameron
2022-09-06 9:04 ` [PATCH v3 2/3] iio: temperature: mlx90632 Read sampling frequency cmo
2022-09-06 10:21 ` Andy Shevchenko
2022-09-15 14:09 ` Jonathan Cameron
2022-09-06 9:04 ` [PATCH v3 3/3] iio: temperature: mlx90632 Change return value of sensor measurement channel cmo
2022-09-06 10:23 ` Andy Shevchenko
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=20220908134319.00005f59@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=andy.shevchenko@gmail.com \
--cc=cmo@melexis.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.