]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cpufreq: qcom: Fix qcom_cpufreq_hw_recalc_rate() to query LUT if LMh IRQ is not available
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Thu, 5 Dec 2024 16:50:28 +0000 (22:20 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Mon, 23 Dec 2024 10:56:49 +0000 (16:26 +0530)
commit85d8b11351a8f15d6ec7a5e97909861cb3b6bcec
treedb44a861ffc4540b1b3fc5d3d5eb04205136fc74
parent1a4ddf6ab9dde8a7e1e025c44745862705636b2f
cpufreq: qcom: Fix qcom_cpufreq_hw_recalc_rate() to query LUT if LMh IRQ is not available

Currently, qcom_cpufreq_hw_recalc_rate() returns the LMh throttled
frequency for the domain even if LMh IRQ is not available. But as per
qcom_cpufreq_hw_get(), the driver has to query LUT entries to get the
actual frequency of the domain. So do the same in
qcom_cpufreq_hw_recalc_rate().

While doing so, refactor the existing qcom_cpufreq_hw_get() function so
that qcom_cpufreq_hw_recalc_rate() can make use of the existing code and
avoid code duplication. This also requires setting the
qcom_cpufreq_data::policy even if LMh IRQ is not available.

Fixes: 4370232c727b ("cpufreq: qcom-hw: Add CPU clock provider support")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/qcom-cpufreq-hw.c