[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c48500cd-50be-1d70-2f2c-02c2dcede1eb@denx.de>
Date: Fri, 22 Apr 2022 18:26:32 +0200
From: Marek Vasut <marex@...x.de>
To: Fabien Dessenne <fabien.dessenne@...s.st.com>,
Linus Walleij <linus.walleij@...aro.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...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
Subject: Re: [PATCH] pinctrl: stm32: improve bank clocks management
On 4/22/22 16:36, Fabien Dessenne wrote:
> Instead of enabling/disabling the clock at each IO configuration update,
> just keep the clock enabled from the probe.
> This makes things simpler and more efficient (e.g. the time required to
> toggle an output IO is drastically decreased) without significantly
> increasing the power consumption.
[...]
> static struct irq_domain *stm32_pctrl_get_irq_domain(struct device_node *np)
> @@ -1575,6 +1537,10 @@ int stm32_pctl_probe(struct platform_device *pdev)
> ret = stm32_gpiolib_register_bank(pctl, child);
> if (ret) {
> of_node_put(child);
> +
> + for (i = 0; i < pctl->nbanks; i++)
> + clk_disable_unprepare(pctl->banks[i].clk);
> +
There are clk_bulk_*() functions, maybe you can use those to get rid of
these loops ?
The rest looks good to me.
Powered by blists - more mailing lists