Il 08/04/22 06:59, Rex-BC Chen ha scritto:
From: Jia-Wei Chang <jia-wei.chang@xxxxxxxxxxxx>
Voltages and shifts are defined as macros originally.
There are different requirements of these values for each MediaTek SoCs.
Therefore, we add the platform data and move these values into it.
Signed-off-by: Jia-Wei Chang <jia-wei.chang@xxxxxxxxxxxx>
Signed-off-by: Rex-BC Chen <rex-bc.chen@xxxxxxxxxxxx>
---
drivers/cpufreq/mediatek-cpufreq.c | 90 ++++++++++++++++++++----------
1 file changed, 61 insertions(+), 29 deletions(-)
diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c
index 1369da62780a..0be5609ee82e 100644
--- a/drivers/cpufreq/mediatek-cpufreq.c
+++ b/drivers/cpufreq/mediatek-cpufreq.c
..snip..
@@ -625,20 +649,27 @@ static struct platform_driver mtk_cpufreq_platdrv = {
.probe = mtk_cpufreq_probe,
};
+static const struct mtk_cpufreq_platform_data mtk_platform_data = {
I would prefer if you name this after the oldest SoC that is supported in this
driver, or after the IP version.
Example: if the oldest one is mt7622, then this should be mt7622_platform_data;
if newer SoCs have got a different cpu frequency control IP, then we
should have here something like
mtk_v1_platform_data, mtk_v1_3_platform_data.
Please note that I didn't check release dates, so my reference to mt7622 is
purely casual.
Regards,
Angelo