From: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
To: paul@crapouillou.net, linux-mips@vger.kernel.org
Cc: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
tiwai@suse.com, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org, jihed.chaibi.dev@gmail.com
Subject: [PATCH 0/3] ASoC: jz47xx: Convert to devm_clk_get_enabled()
Date: Mon, 23 Mar 2026 17:15:48 +0100 [thread overview]
Message-ID: <20260323161551.47181-1-jihed.chaibi.dev@gmail.com> (raw)
The jz4725b, jz4760 and jz4770 Ingenic codec drivers all share the same
clock management pattern: the clock is obtained with devm_clk_get() in
the platform probe, then manually enabled in the component probe and
disabled in the component remove. The clk_prepare_enable() call in the
component probe is unchecked, meaning clock enable failures are silently
ignored and can lead to register access on unpowered hardware.
This series converts all three drivers to devm_clk_get_enabled(), which
combines the get, prepare and enable steps and ties the clock lifetime to
the device via devres. The now-redundant component remove callbacks and
the struct clk pointers in the private structs are removed.
Jihed Chaibi (3):
ASoC: jz4725b: Convert to devm_clk_get_enabled()
ASoC: jz4760: Convert to devm_clk_get_enabled()
ASoC: jz4770: Convert to devm_clk_get_enabled()
sound/soc/codecs/jz4725b.c | 18 ++++--------------
sound/soc/codecs/jz4760.c | 20 ++++----------------
sound/soc/codecs/jz4770.c | 20 ++++----------------
3 files changed, 12 insertions(+), 46 deletions(-)
--
2.47.3
next reply other threads:[~2026-03-23 16:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 16:15 Jihed Chaibi [this message]
2026-03-23 16:15 ` [PATCH 1/3] ASoC: jz4725b: Convert to devm_clk_get_enabled() Jihed Chaibi
2026-03-23 16:46 ` Mark Brown
2026-03-23 16:15 ` [PATCH 2/3] ASoC: jz4760: " Jihed Chaibi
2026-03-23 16:15 ` [PATCH 3/3] ASoC: jz4770: " Jihed Chaibi
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=20260323161551.47181-1-jihed.chaibi.dev@gmail.com \
--to=jihed.chaibi.dev@gmail.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=paul@crapouillou.net \
--cc=perex@perex.cz \
--cc=tiwai@suse.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