[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <YvpsRbguMXn74GhR@pendragon.ideasonboard.com>
Date: Mon, 15 Aug 2022 18:54:45 +0300
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Mark Brown <broonie@...nel.org>
Cc: Matti Vaittinen <mazziesaccount@...il.com>,
Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
dri-devel@...ts.freedesktop.org,
Johan Hovold <johan+linaro@...nel.org>,
Neil Armstrong <narmstrong@...libre.com>,
Lars-Peter Clausen <lars@...afoo.de>,
Kevin Hilman <khilman@...libre.com>,
linux-kernel@...r.kernel.org, Daniel Vetter <daniel@...ll.ch>,
linux-amlogic@...ts.infradead.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-doc@...r.kernel.org, Jonathan Cameron <jic23@...nel.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Liam Girdwood <lgirdwood@...il.com>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Miaoqian Lin <linmq006@...il.com>,
linux-arm-kernel@...ts.infradead.org,
Alexandru Tachici <alexandru.tachici@...log.com>,
Jerome Brunet <jbrunet@...libre.com>,
Andrzej Hajda <andrzej.hajda@...el.com>,
Jonathan Corbet <corbet@....net>,
Guenter Roeck <linux@...ck-us.net>,
Jonas Karlman <jonas@...boo.se>,
Stephen Boyd <sboyd@...nel.org>,
Lorenzo Bianconi <lorenzo@...nel.org>,
Michael Turquette <mturquette@...libre.com>,
Jernej Skrabec <jernej.skrabec@...il.com>,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
Jean Delvare <jdelvare@...e.com>,
Alexandru Ardelean <aardelean@...iqon.com>,
linux-hwmon@...r.kernel.org, linux-clk@...r.kernel.org,
Nuno Sá <nuno.sa@...log.com>,
Robert Foss <robert.foss@...aro.org>,
Aswath Govindraju <a-govindraju@...com>,
David Airlie <airlied@...ux.ie>, linux-iio@...r.kernel.org
Subject: Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable
On Mon, Aug 15, 2022 at 04:44:44PM +0100, Mark Brown wrote:
> On Fri, 12 Aug 2022 13:08:17 +0300, Matti Vaittinen wrote:
> > Devm helpers for regulator get and enable
> >
> > First patch in the series is actually just a simple documentation fix
> > which could be taken in as it is now.
> >
> > A few* drivers seem to use pattern demonstrated by pseudocode:
> >
> > [...]
>
> Applied to
>
> https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
>
> Thanks!
>
> [1/7] docs: devres: regulator: Add missing devm_* functions to devres.rst
> commit: 9b6744f60b6b47bc0757a1955adb4d2c3ab22e13
> [2/7] regulator: Add devm helpers for get and enable
> (no commit info)
I didn't have time to reply to the series yet, but I think this isn't a
great idea. There are two issues:
- With devres, you don't have full control over the order in which
resources will be released, which means that you can't control the
power off sequence, in particular if it needs to be sequenced with
GPIOs and clocks. That's not a concern for all drivers, but this API
will creep in in places where it shouldn't be used, driver authours
should really pay attention to power management and not live with the
false impression that everything will be handled automatically for
them. In the worst cases, an incorrect power off sequence could lead
to hardware damage.
- Powering regulators on at probe time and leaving them on is a very bad
practice from a power management point of view, and should really be
discouraged. Adding convenience helpers to make this easy is the wrong
message, we should instead push driver authors to implement proper
runtime PM.
> All being well this means that it will be integrated into the linux-next
> tree (usually sometime in the next 24 hours) and sent to Linus during
> the next merge window (or sooner if it is a bug fix), however if
> problems are discovered then the patch may be dropped or reverted.
>
> You may get further e-mails resulting from automated or manual testing
> and review of the tree, please engage with people reporting problems and
> send followup patches addressing any issues that are reported if needed.
>
> If any updates are required or you are submitting further changes they
> should be sent as incremental updates against current git, existing
> patches will not be replaced.
>
> Please add any relevant lists and maintainers to the CCs when replying
> to this mail.
--
Regards,
Laurent Pinchart
Powered by blists - more mailing lists