]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI: rockchip: Simplify clock handling by using clk_bulk*() functions
authorAnand Moon <linux.amoon@gmail.com>
Mon, 2 Dec 2024 15:11:42 +0000 (20:41 +0530)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 13 Jan 2025 21:10:38 +0000 (15:10 -0600)
commitabdd4c8ea7d75308315a15cfb97d2eabfb4d052b
treee44de8f54a31296d1991fcae837fadae0c60f832
parentfd46bc0e0bb3c6607363bd23f2b3c2a73dc75d66
PCI: rockchip: Simplify clock handling by using clk_bulk*() functions

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

Link: https://lore.kernel.org/r/20241202151150.7393-2-linux.amoon@gmail.com
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
[bhelgaas: squash error handling fix from https://lore.kernel.org/r/20250106153041.55267-1-linux.amoon@gmail.com]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
drivers/pci/controller/pcie-rockchip.c
drivers/pci/controller/pcie-rockchip.h