From: Jonathan Cameron <jic23@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-iio@vger.kernel.org,
"Rafael J . Wysocki" <rafael@kernel.org>,
linux-pm@vger.kernel.org, Paul Cercueil <paul@crapouillou.net>,
Sean Nyekjaer <sean@geanix.com>,
Rui Miguel Silva <rui.silva@linaro.org>,
Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH 0/5] PM: Introduce EXPORT_NS_GPL_DEV_PM_OPS() and use cases in IIO.
Date: Mon, 22 Aug 2022 19:59:50 +0100 [thread overview]
Message-ID: <20220822195950.1b1249c2@jic23-huawei> (raw)
In-Reply-To: <CACRpkdb6qxO38kS1=cEja-KZSR5RcV-oWX36ikxggsLm8Y5ixw@mail.gmail.com>
On Mon, 22 Aug 2022 11:04:18 +0200
Linus Walleij <linus.walleij@linaro.org> wrote:
> On Sun, Aug 7, 2022 at 9:10 PM Jonathan Cameron <jic23@kernel.org> wrote:
>
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> >
> > Perhaps the most complex case we can have is a core driver module (usually
> > with accompanying per bus modules) that exports, in a namespace,
> > a struct dev_pm_ops. The driver has different handling for runtime and
> > sleep suspend / resume so (almost) all callbacks are provided.
> > The pm.h helper macro _EXPORT_DEV_PM_OPS() could be used here but the
> > handling of the last two parameters is unusual and very different from
> > the macros intended for driver usage. First parameter needs to be "_gpl"
> > and second needs to be the namespace specified as a string. Other NS
> > macros take it without quotes.
> >
> > As such, this series proposes introducing a suitable macro and then provides
> > a number of IIO driver conversions. Where relevant the exports from the
> > driver are moved into the new namespace.
> >
> > If accepted we can either take the whole lot through the PM tree and hope
> > there is nothing much else overlapping with this driver code in this cycle,
> > or ideally we could use an immutable branch and pull this into both the
> > IIO and PM trees.
> >
> > Jonathan Cameron (5):
> > PM: core: Add EXPORT_NS_GPL_DEV_PM_OPS to avoid drivers rolling own.
> > iio: accel: fxls8962af: Use new EXPORT_NS_GPL_DEV_PM_OPS()
> > iio: gyro: fxas210002c: Move exports to IIO_FXAS210002C namespace.
> > iio: imu: inv_icm42600: Move exports to IIO_ICM42600 namespace
> > iio: imu: inv_mpu: Move exports to IIO_MPU6050 namespace
>
> I like what you done here.
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
Unfortunately change of plan because the EXPORT_NS_GPL_DEV_PM_OPS isn't
general enough to cover some cases elsewhere.
https://lore.kernel.org/all/20220808174107.38676-2-paul@crapouillou.net/
I'll switch this series over to being based on that which will be
a large enough change that I'll probably not pick up any tags given on
this version.
Thanks
Jonathan
>
> Yours,
> Linus Walleij
prev parent reply other threads:[~2022-08-22 19:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-07 19:20 [PATCH 0/5] PM: Introduce EXPORT_NS_GPL_DEV_PM_OPS() and use cases in IIO Jonathan Cameron
2022-08-07 19:20 ` [PATCH 1/5] PM: core: Add EXPORT_NS_GPL_DEV_PM_OPS to avoid drivers rolling own Jonathan Cameron
2022-08-08 11:22 ` Paul Cercueil
2022-08-13 16:14 ` Jonathan Cameron
2022-08-07 19:20 ` [PATCH 2/5] iio: accel: fxls8962af: Use new EXPORT_NS_GPL_DEV_PM_OPS() Jonathan Cameron
2022-08-08 11:37 ` Sean Nyekjaer
2022-08-07 19:20 ` [PATCH 3/5] iio: gyro: fxas210002c: Move exports to IIO_FXAS210002C namespace Jonathan Cameron
2022-08-08 11:00 ` Rui Miguel Silva
2022-08-07 19:20 ` [PATCH 4/5] iio: imu: inv_icm42600: Move exports to IIO_ICM42600 namespace Jonathan Cameron
2022-08-07 19:20 ` [PATCH 5/5] iio: imu: inv_mpu: Move exports to IIO_MPU6050 namespace Jonathan Cameron
2022-08-22 8:59 ` Linus Walleij
2022-08-08 9:36 ` [PATCH 0/5] PM: Introduce EXPORT_NS_GPL_DEV_PM_OPS() and use cases in IIO Andy Shevchenko
2022-08-22 9:04 ` Linus Walleij
2022-08-22 18:59 ` Jonathan Cameron [this message]
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=20220822195950.1b1249c2@jic23-huawei \
--to=jic23@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=jean-baptiste.maneyrol@tdk.com \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=paul@crapouillou.net \
--cc=rafael@kernel.org \
--cc=rui.silva@linaro.org \
--cc=sean@geanix.com \
/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