]> exis.tech > repos - linux.git/commit
ASoC: codecs: rk3328: Use managed GPIO and clock helpers
authorCássio Gabriel <cassiogabrielcontato@gmail.com>
Mon, 25 May 2026 17:18:03 +0000 (14:18 -0300)
committerMark Brown <broonie@kernel.org>
Tue, 2 Jun 2026 15:06:48 +0000 (16:06 +0100)
commit0cf3489bba9ad13aae052232e223e19a620fe7a7
tree259b7b93145fa52e1f697e288814b0377c8f5657
parent2d90ecdfa32660f9f4f4b36440755c5388690209
ASoC: codecs: rk3328: Use managed GPIO and clock helpers

rk3328_platform_probe() acquires the mute GPIO with gpiod_get_optional()
but never releases it. It also enables mclk and pclk manually while
relying on probe error labels for unwind, and the driver has no platform
remove callback to disable those clocks after a successful unbind.

This path has already needed fixes for missing clock unwinds on probe
errors. Use devm_gpiod_get_optional() and devm_clk_get_enabled() so the
GPIO and enabled clock lifetimes are tied to the device. This removes the
manual error labels and makes both probe failure and driver unbind follow
the normal devres cleanup path.

Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Link: https://patch.msgid.link/20260525-asoc-rk3328-devm-resources-v1-1-2abde0006f89@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rk3328_codec.c