]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
phy: qcom-qmp-ufs: Add regulator load voting for UFS QMP PHY
authorNitin Rawat <quic_nitirawa@quicinc.com>
Sat, 30 Aug 2025 07:03:52 +0000 (12:33 +0530)
committerVinod Koul <vkoul@kernel.org>
Mon, 1 Sep 2025 12:03:10 +0000 (17:33 +0530)
commit0c4916aadb8df892399eec99f775655c31049195
treefa450e53d9f5f255749af6ee2d7c872388a9fda0
parent38404274bbee1f0001a490c0dc98aac32a4d7c9d
phy: qcom-qmp-ufs: Add regulator load voting for UFS QMP PHY

On certain SoCs, power regulators are shared between the QMP UFS PHY
and other IP blocks. To ensure proper operation, the regulator
framework must be informed of the UFS PHY's load requirements.
This is essential because the regulator's operating mode—whether Low
Power or High Power—depends on the maximum expected load at any given
time, which the regulator driver needs to manage accordingly.

To support this, replace devm_regulator_bulk_get() with
devm_regulator_bulk_get_const() and inline the qmp_ufs_vreg_init()
function. additionally replace the array of regulator names with a
bulk regulator data structure, and utilize the init_load_uA field
provided by the regulator framework. This ensures that
regulator_set_load() is automatically invoked before the
first enable operation.

Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
Link: https://lore.kernel.org/r/20250830070353.2694-2-nitin.rawat@oss.qualcomm.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/qualcomm/phy-qcom-qmp-ufs.c