[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220415055916.28350-9-rex-bc.chen@mediatek.com>
Date: Fri, 15 Apr 2022 13:59:09 +0800
From: Rex-BC Chen <rex-bc.chen@...iatek.com>
To: <rafael@...nel.org>, <viresh.kumar@...aro.org>,
<robh+dt@...nel.org>, <krzk+dt@...nel.org>,
<matthias.bgg@...il.com>
CC: <jia-wei.chang@...iatek.com>, <roger.lu@...iatek.com>,
<hsinyi@...gle.com>, <khilman@...libre.com>,
<angelogioacchino.delregno@...labora.com>,
<linux-pm@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>,
<Project_Global_Chrome_Upstream_Group@...iatek.com>,
Rex-BC Chen <rex-bc.chen@...iatek.com>
Subject: [PATCH V3 08/15] cpufreq: mediatek: Make sram regulator optional
From: Jia-Wei Chang <jia-wei.chang@...iatek.com>
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 NULL 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@...iatek.com>
Signed-off-by: Rex-BC Chen <rex-bc.chen@...iatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
---
drivers/cpufreq/mediatek-cpufreq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c
index 4d46e823c24e..559f4a383d30 100644
--- a/drivers/cpufreq/mediatek-cpufreq.c
+++ b/drivers/cpufreq/mediatek-cpufreq.c
@@ -436,7 +436,7 @@ static int mtk_cpu_dvfs_info_init(struct mtk_cpu_dvfs_info *info, int cpu)
}
/* 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 {
--
2.18.0
Powered by blists - more mailing lists