cpufreq: qcom-hw: Fix the frequency returned by cpufreq_driver->get()
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Thu, 17 Nov 2022 05:31:45 +0000 (11:01 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:31:56 +0000 (13:31 +0100)
commit205f5e984d30cdb7b01f770d6dd8838afb9d71b6
tree3bb870d00575dbf2c95e8af8f8bda02cd64ef504
parenta753ee5103656c31d452de4ead4aa8f03e45b3b9
cpufreq: qcom-hw: Fix the frequency returned by cpufreq_driver->get()

[ Upstream commit c72cf0cb1d77f6b1b58c334dcc3d09fa13111c4c ]

The cpufreq_driver->get() callback is supposed to return the current
frequency of the CPU and not the one requested by the CPUFreq core.
Fix it by returning the frequency that gets supplied to the CPU after
the DCVS operation of EPSS/OSM.

Fixes: 2849dd8bc72b ("cpufreq: qcom-hw: Add support for QCOM cpufreq HW driver")
Reported-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/cpufreq/qcom-cpufreq-hw.c