cpufreq: sun50i: Refactor speed bin decoding
authorBrandon Cheo Fusi <fusibrandon13@gmail.com>
Thu, 18 Apr 2024 15:44:04 +0000 (16:44 +0100)
committerViresh Kumar <viresh.kumar@linaro.org>
Fri, 19 Apr 2024 07:04:27 +0000 (12:34 +0530)
commit6cc4bcceff9af0e6be9738096d95e4ba75e75123
treea280cd71ea8bad4649351843dd50526cf2a348fb
parent83d4e044310a7d26d1a5443c23451d4b9da9ada3
cpufreq: sun50i: Refactor speed bin decoding

Make converting the speed bin value into a speed grade generic and
determined by a platform specific callback. Also change the prototypes
involved to encode the speed bin directly in the return value.

This allows to extend the driver more easily to support more SoCs.

Signed-off-by: Brandon Cheo Fusi <fusibrandon13@gmail.com>
[Andre: merge output into return value]
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/sun50i-cpufreq-nvmem.c