diff options
| author | Peng Fan <peng.fan@nxp.com> | 2026-11-05 11:53:01 +0800 |
|---|---|---|
| committer | Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> | 2026-11-10 12:29:01 +0100 |
| commit | 00e3c475fefd0eceb7e1e01305ae3587e654bd94 (patch) | |
| tree | 681180fa22118f7c8233bce49aa0124ca353e1ac /scripts/Makefile.thinlto | |
| parent | 4d49c80223fea433266e5b84464211c6acd86347 (diff) | |
| download | linux-next-00e3c475fefd0eceb7e1e01305ae3587e654bd94.tar.gz linux-next-00e3c475fefd0eceb7e1e01305ae3587e654bd94.zip | |
gpio: vf610: use devm_clk_get_optional_enabled() for clock handling
Replace the manual clock acquisition, enable and cleanup sequences with
devm_clk_get_optional_enabled() for both the port and gpio clocks. The
helper treats a missing clock as NULL and automatically disables and
unprepares the clocks on driver unbind, so the vf610_gpio_disable_clk()
helper is no longer needed.
Unlike the previous code, propagate all errors from the helper,
including clk_prepare_enable() failures. The old code only tolerated
lookup errors and failed probe when enabling the clock failed; continuing
with a disabled clock could fault when accessing the PORT/GPIO registers.
The optional helper already covers the "clock not described" case, so
there is no need to silently ignore other errors.
The clock pointers are only needed during probe now that devm manages
their lifetime, so drop them from struct vf610_gpio_port and use a local
variable instead.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20261105-gpio-vf610-fixes-v3-3-504e19de5ad5@nxp.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
