mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Fabio Estevam <festevam@gmail.com>,
	mfd@lists.linux.dev, imx@lists.linux.dev,
	Lee Jones <lee@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org,
	Andy Shevchenko <andy@kernel.org>,
	Christophe Jaillet <christophe.jaillet@wanadoo.fr>,
	Frank Li <Frank.Li@nxp.com>, Jonathan Cameron <jic23@kernel.org>,
	Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Subject: Re: [PATCH v6 2/2] mfd: mxs-lradc: Convert to devm_clk_get_enabled()
Date: Sat, 28 Nov 2026 13:48:06 +0100	[thread overview]
Message-ID: <535add0f-1c79-4b88-ac03-115115f22e2f@web.de> (raw)
In-Reply-To: <20261127180709.315826-2-festevam@gmail.com>

> The LRADC clock is acquired with a managed helper but enabled and
> disabled manually.
> 
> Acquire the LRADC clock with devm_clk_get_enabled() instead of a bare
> devm_clk_get() followed by a manual clk_prepare_enable(), so it is
> prepared/enabled for the device lifetime and released on unbind.
> 
> This conversion makes the code simpler.

Is it still required to store the clock object within the data structure?
https://elixir.bootlin.com/linux/v7.4-rc2/source/include/linux/mfd/mxs-lradc.h#L150-L164

Would a local variable become sufficient after the proposed source code transformation?
https://elixir.bootlin.com/linux/v7.4-rc2/source/drivers/mfd/mxs-lradc.c#L126-L231

Regards,
Markus

      parent reply	other threads:[~2026-11-28 12:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20261127180709.315826-2-festevam@gmail.com>
2026-11-28 12:13 ` Markus Elfring
2026-11-28 12:48 ` Markus Elfring [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=535add0f-1c79-4b88-ac03-115115f22e2f@web.de \
    --to=markus.elfring@web.de \
    --cc=Frank.Li@nxp.com \
    --cc=andy@kernel.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=jic23@kernel.org \
    --cc=jonathan.cameron@oss.qualcomm.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfd@lists.linux.dev \
    /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

all inboxes | Powered by JetHome®