aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2022-10-16 19:35:50 +0100
committerDaniel Golle <daniel@makrotopia.org>2022-10-18 20:08:25 +0100
commitb00640bd062e3f496f349c05218dabf5cafcd8e2 (patch)
tree7a9f3d61ac07ff7f06ca4a2cef4f14be096d0d67 /target/linux/mediatek
parentb63d6d4730fd0dc30ce6707338c398e8b9d61d86 (diff)
downloadupstream-b00640bd062e3f496f349c05218dabf5cafcd8e2.tar.gz
upstream-b00640bd062e3f496f349c05218dabf5cafcd8e2.tar.bz2
upstream-b00640bd062e3f496f349c05218dabf5cafcd8e2.zip
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>
Diffstat (limited to 'target/linux/mediatek')
-rw-r--r--target/linux/mediatek/patches-5.15/501-auxadc-add-auxadc-32k-clk.patch12
1 files changed, 7 insertions, 5 deletions
diff --git a/target/linux/mediatek/patches-5.15/501-auxadc-add-auxadc-32k-clk.patch b/target/linux/mediatek/patches-5.15/501-auxadc-add-auxadc-32k-clk.patch
index a49fbca4ee..5b98235ff4 100644
--- a/target/linux/mediatek/patches-5.15/501-auxadc-add-auxadc-32k-clk.patch
+++ b/target/linux/mediatek/patches-5.15/501-auxadc-add-auxadc-32k-clk.patch
@@ -8,14 +8,16 @@
struct mutex lock;
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;
}
-+ ret = clk_prepare_enable(adc_dev->adc_32k_clk);
-+ if (ret) {
-+ pr_err("failed to enable auxadc clock\n");
-+ return ret;
++ if (!IS_ERR(adc_dev->adc_32k_clk)) {
++ ret = clk_prepare_enable(adc_dev->adc_32k_clk);
++ if (ret) {
++ pr_err("failed to enable auxadc clock\n");
++ return ret;
++ }
+ }
+
mt6577_auxadc_mod_reg(adc_dev->reg_base + MT6577_AUXADC_MISC,