mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-06-16 02:25:29 +08:00
mediatek: don't break auxadc without 32k clk
Make the newly added 32k clock optional for the auxadc driver also used on pre-filogic platforms. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
parent
67017451e4
commit
072de63901
@ -8,14 +8,16 @@
|
|||||||
struct mutex lock;
|
struct mutex lock;
|
||||||
const struct mtk_auxadc_compatible *dev_comp;
|
const struct mtk_auxadc_compatible *dev_comp;
|
||||||
};
|
};
|
||||||
@@ -222,6 +223,12 @@ static int __maybe_unused mt6577_auxadc_
|
@@ -222,6 +223,14 @@ static int __maybe_unused mt6577_auxadc_
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ ret = clk_prepare_enable(adc_dev->adc_32k_clk);
|
+ if (!IS_ERR(adc_dev->adc_32k_clk)) {
|
||||||
+ if (ret) {
|
+ ret = clk_prepare_enable(adc_dev->adc_32k_clk);
|
||||||
+ pr_err("failed to enable auxadc clock\n");
|
+ if (ret) {
|
||||||
+ return ret;
|
+ pr_err("failed to enable auxadc clock\n");
|
||||||
|
+ return ret;
|
||||||
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
mt6577_auxadc_mod_reg(adc_dev->reg_base + MT6577_AUXADC_MISC,
|
mt6577_auxadc_mod_reg(adc_dev->reg_base + MT6577_AUXADC_MISC,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user