Re: [RFC v1 1/2] PCI: tegra: Simplify clock handling by using clk_bulk*() functions

From: Jon Hunter

Date: Wed Sep 17 2025 - 09:52:54 EST



On 31/08/2025 20:00, Anand Moon wrote:
Currently, the driver acquires clocks and prepare/enable/disable/unprepare
the clocks individually thereby making the driver complex to read.

The driver can be simplified by using the clk_bulk*() APIs.

Use:
- devm_clk_bulk_get_all() API to acquire all the clocks
- clk_bulk_prepare_enable() to prepare/enable clocks
- clk_bulk_disable_unprepare() APIs to disable/unprepare them in bulk

As part of this cleanup, the legacy has_cml_clk flag and explicit handling
of individual clocks (pex, afi, pll_e, cml) are removed. Clock sequencing
is now implicitly determined by the order defined in the device tree,
eliminating hardcoded logic and improving maintainability.

What platforms have you tested this change on?

Thanks
Jon

--
nvpublic