mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 07:22:33 +00:00
670dedbbd7
Backport cpufreq changes from upstream so that the MediaTek MT7988 SoC
can be supported.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit e4555d69a1
)
31 lines
1.2 KiB
Diff
31 lines
1.2 KiB
Diff
From f6114c2bc563a8050e9dc874ad87e1448865f031 Mon Sep 17 00:00:00 2001
|
|
From: Jia-Wei Chang <jia-wei.chang@mediatek.com>
|
|
Date: Fri, 22 Apr 2022 15:52:33 +0800
|
|
Subject: [PATCH 07/21] cpufreq: mediatek: Make sram regulator optional
|
|
|
|
For some MediaTek SoCs, like MT8186, it's possible that the sram regulator
|
|
is shared between CPU and CCI.
|
|
We hope regulator framework can return error for error handling rather
|
|
than a dummy handler from regulator_get api.
|
|
Therefore, we choose to use regulator_get_optional.
|
|
|
|
Signed-off-by: Jia-Wei Chang <jia-wei.chang@mediatek.com>
|
|
Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
|
|
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
|
|
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
|
|
---
|
|
drivers/cpufreq/mediatek-cpufreq.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/drivers/cpufreq/mediatek-cpufreq.c
|
|
+++ b/drivers/cpufreq/mediatek-cpufreq.c
|
|
@@ -354,7 +354,7 @@ static int mtk_cpu_dvfs_info_init(struct
|
|
}
|
|
|
|
/* Both presence and absence of sram regulator are valid cases. */
|
|
- info->sram_reg = regulator_get_exclusive(cpu_dev, "sram");
|
|
+ info->sram_reg = regulator_get_optional(cpu_dev, "sram");
|
|
if (IS_ERR(info->sram_reg))
|
|
info->sram_reg = NULL;
|
|
else {
|