[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <412e65b5-dd91-4982-8b1a-423997da9a28@denx.de>
Date: Mon, 23 Dec 2024 20:33:07 +0100
From: Marek Vasut <marex@...x.de>
To: Mingwei Zheng <zmw12306@...il.com>
Cc: antonio.borneo@...s.st.com, linus.walleij@...aro.org,
mcoquelin.stm32@...il.com, alexandre.torgue@...s.st.com, make24@...as.ac.cn,
peng.fan@....com, fabien.dessenne@...s.st.com, linux-gpio@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Jiasheng Jiang <jiashengjiangcool@...il.com>
Subject: Re: [PATCH v6] pinctrl: stm32: Add check for clk_enable()
On 12/23/24 3:06 AM, Mingwei Zheng wrote:
[...]
Shouldn't the clock be enabled before calling
stm32_gpiolib_register_bank() ? I think the
clk_bulk_prepare_enable(pctl->nbanks, pctl->clks); should be around here.
> @@ -1646,15 +1628,18 @@ int stm32_pctl_probe(struct platform_device *pdev)
> if (ret) {
> fwnode_handle_put(child);
>
> - for (i = 0; i < pctl->nbanks; i++)
> - clk_disable_unprepare(pctl->banks[i].clk);
> -
> return ret;
> }
>
> pctl->nbanks++;
> }
>
> + ret = clk_bulk_prepare_enable(pctl->nbanks, pctl->clks);
> + if (ret) {
> + dev_err(dev, "failed to prepare_enable clk (%d)\n", ret);
> + return ret;
> + }
> +
> dev_info(dev, "Pinctrl STM32 initialized\n");
>
> return 0;
Aside from that one question, this looks good, thanks !
Powered by blists - more mailing lists