LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Alexandru Ardelean <aardelean@deviqon.com>
Cc: linux-iio <linux-iio@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Denis CIOCCA <denis.ciocca@st.com>,
Jonathan Cameron <jic23@kernel.org>,
Lee Jones <lee.jones@linaro.org>,
Andy Shevchenko <andy.shevchenko@gmail.com>
Subject: Re: [PATCH v3 3/5] iio: st_sensors: remove st_sensors_power_disable() function
Date: Sat, 28 Aug 2021 00:32:36 +0200 [thread overview]
Message-ID: <CACRpkdZRRODGR57U2308QMCf6pCoNNWRXxc0YWHW14+CX-a0Jw@mail.gmail.com> (raw)
In-Reply-To: <20210823112204.243255-4-aardelean@deviqon.com>
On Mon, Aug 23, 2021 at 1:22 PM Alexandru Ardelean
<aardelean@deviqon.com> wrote:
> This change converts the st_sensors_power_enable() function to use
> devm_add_action_or_reset() handlers to register regulator_disable hooks for
> when the drivers get unloaded.
>
> The parent device of the IIO device object is used. This is based on the
> assumption that all other devm_ calls in the ST sensors use this reference.
>
> This makes the st_sensors_power_disable() un-needed.
> Removing this also changes unload order a bit, as all ST drivers would call
> st_sensors_power_disable() first and iio_device_unregister() after that.
>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
We should at some point add proper runtime PM to the ST sensors
(cf drivers/iio/gyro/mpu3050-core.c) but that can certainly be built
on top of this patch.
Yours,
Linus Walleij
next prev parent reply other threads:[~2021-08-27 22:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-23 11:21 [PATCH v3 0/5] iio: st_sensors: convert probe functions to full devm Alexandru Ardelean
2021-08-23 11:22 ` [PATCH v3 1/5] iio: st_sensors: disable regulators after device unregistration Alexandru Ardelean
2021-08-23 11:22 ` [PATCH v3 2/5] iio: st_sensors: remove st_sensors_deallocate_trigger() function Alexandru Ardelean
2021-08-27 22:29 ` Linus Walleij
2021-08-23 11:22 ` [PATCH v3 3/5] iio: st_sensors: remove st_sensors_power_disable() function Alexandru Ardelean
2021-08-27 22:32 ` Linus Walleij [this message]
2021-08-23 11:22 ` [PATCH v3 4/5] iio: st_sensors: remove all driver remove functions Alexandru Ardelean
2021-08-27 22:33 ` Linus Walleij
2021-08-23 11:22 ` [PATCH v3 5/5] iio: st_sensors: remove reference to parent device object on st_sensor_data Alexandru Ardelean
2021-08-27 22:35 ` Linus Walleij
2021-08-29 14:48 ` [PATCH v3 0/5] iio: st_sensors: convert probe functions to full devm 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=CACRpkdZRRODGR57U2308QMCf6pCoNNWRXxc0YWHW14+CX-a0Jw@mail.gmail.com \
--to=linus.walleij@linaro.org \
--cc=aardelean@deviqon.com \
--cc=andy.shevchenko@gmail.com \
--cc=denis.ciocca@st.com \
--cc=jic23@kernel.org \
--cc=lee.jones@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: [PATCH v3 3/5] iio: st_sensors: remove st_sensors_power_disable() function' \
/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
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).