[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdUgHLB6k1jVXdk08U5tgk6M7jGjhaWwpxDZGtoi8ViTjA@mail.gmail.com>
Date: Fri, 21 Jun 2024 17:29:13 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Philipp Zabel <p.zabel@...gutronix.de>
Cc: Prabhakar <prabhakar.csengg@...il.com>, linux-kernel@...r.kernel.org,
linux-renesas-soc@...r.kernel.org,
Fabrizio Castro <fabrizio.castro.jz@...esas.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: Re: [RFC PATCH] reset: Add devm_reset_control_deassert helper
Hi Philipp,
On Fri, Jun 21, 2024 at 4:45 PM Philipp Zabel <p.zabel@...gutronix.de> wrote:
> On Do, 2024-04-18 at 14:26 +0100, Prabhakar wrote:
> > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
> >
> > A typical code pattern for reset_control_deassert() call is to call it in
> > the _probe function and to call reset_control_assert() both from _probe
> > error path and from _remove function.
> >
> > Add helper function to replace this bolierplate piece of code. Calling
> > devm_reset_control_deassert() removes the need for calling
> > reset_control_assert() both in the probe()'s error path and in the
> > remove() function.
> >
> > Suggested-by: Geert Uytterhoeven <geert+renesas@...der.be>
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
>
> I'm not sure this aligns well with the intended use of devres for
> resource acquisition and release.
>
> Note how there is no devm_clk_prepare_enable, devm_regulator_enable,
> devm_gpiod_set_value_cansleep, or devm_pwm_enable either.
>
> I've sent an alternative suggestion that adds
> devm_reset_control_get..._deasserted calls, similarly to the existing
> devm_clk_get..._enabled calls. Please let me know what you think.
Thank you, that sounds like a good alternative.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists