Commit 847af89a authored by Mani Sadhasivam's avatar Mani Sadhasivam Committed by Greg Kroah-Hartman
Browse files

scsi: ufs: core: Add OPP support for scaling clocks and regulators



[ Upstream commit 930bd77e ]

UFS core is only scaling the clocks during devfreq scaling and
initialization. But for an optimum power saving, regulators should also be
scaled along with the clocks.

So let's use the OPP framework which supports scaling clocks, regulators,
and performance state using OPP table defined in devicetree. For
accomodating the OPP support, the existing APIs (ufshcd_scale_clks,
ufshcd_is_devfreq_scaling_required and ufshcd_devfreq_scale) are modified
to accept "freq" as an argument which in turn used by the OPP helpers.

The OPP support is added along with the old freq-table based clock scaling
so that the existing platforms work as expected.

Co-developed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20231012172129.65172-3-manivannan.sadhasivam@linaro.org


Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Stable-dep-of: 2e083cd8 ("scsi: ufs: core: Fix clk scaling to be conditional in reset and restore")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 95ffe734
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment