phy: qcom-snps-femto-v2: properly enable ref clock
authorAdrien Thierry <athierry@redhat.com>
Thu, 29 Jun 2023 14:45:39 +0000 (10:45 -0400)
committerVinod Koul <vkoul@kernel.org>
Wed, 12 Jul 2023 16:57:02 +0000 (22:27 +0530)
commit8a0eb8f9b9a002291a3934acfd913660b905249e
treedffe0877ad3573621800e757b8d5cf41aaed67bb
parent45d89a344eb46db9dce851c28e14f5e3c635c251
phy: qcom-snps-femto-v2: properly enable ref clock

The driver is not enabling the ref clock, which thus gets disabled by
the clk_disable_unused() initcall. This leads to the dwc3 controller
failing to initialize if probed after clk_disable_unused() is called,
for instance when the driver is built as a module.

To fix this, switch to the clk_bulk API to handle both cfg_ahb and ref
clocks at the proper places.

Note that the cfg_ahb clock is currently not used by any device tree
instantiation of the PHY. Work needs to be done separately to fix this.

Link: https://lore.kernel.org/linux-arm-msm/ZEqvy+khHeTkC2hf@fedora/
Fixes: 51e8114f80d0 ("phy: qcom-snps: Add SNPS USB PHY driver for QCOM based SOCs")
Signed-off-by: Adrien Thierry <athierry@redhat.com>
Link: https://lore.kernel.org/r/20230629144542.14906-3-athierry@redhat.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c