[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1609815993-22744-10-git-send-email-yongqiang.niu@mediatek.com>
Date: Tue, 5 Jan 2021 11:06:32 +0800
From: Yongqiang Niu <yongqiang.niu@...iatek.com>
To: CK Hu <ck.hu@...iatek.com>, Philipp Zabel <p.zabel@...gutronix.de>,
Rob Herring <robh+dt@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>
CC: David Airlie <airlied@...ux.ie>, Daniel Vetter <daniel@...ll.ch>,
Mark Rutland <mark.rutland@....com>,
<dri-devel@...ts.freedesktop.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>,
Yongqiang Niu <yongqiang.niu@...iatek.com>
Subject: [PATCH v4, 09/10] soc: mediatek: mmsys: Use function call for setting mmsys ovl mout register
Use function call for setting mmsys ovl mout register
Signed-off-by: Yongqiang Niu <yongqiang.niu@...iatek.com>
---
drivers/soc/mediatek/mmsys/mtk-mmsys.c | 6 ++++++
include/linux/soc/mediatek/mtk-mmsys.h | 4 ++++
2 files changed, 10 insertions(+)
diff --git a/drivers/soc/mediatek/mmsys/mtk-mmsys.c b/drivers/soc/mediatek/mmsys/mtk-mmsys.c
index 075d356..34728ed 100644
--- a/drivers/soc/mediatek/mmsys/mtk-mmsys.c
+++ b/drivers/soc/mediatek/mmsys/mtk-mmsys.c
@@ -68,6 +68,9 @@ void mtk_mmsys_ddp_connect(struct device *dev,
if (funcs->sel_in)
funcs->sel_in(mmsys->regs, cur, next, true);
+
+ if (funcs->ovl_mout_en)
+ funcs->ovl_mout_en(mmsys->regs, cur, next, true);
}
EXPORT_SYMBOL_GPL(mtk_mmsys_ddp_connect);
@@ -86,6 +89,9 @@ void mtk_mmsys_ddp_disconnect(struct device *dev,
if (funcs->sel_in)
funcs->sel_in(mmsys->regs, cur, next, false);
+
+ if (funcs->ovl_mout_en)
+ funcs->ovl_mout_en(mmsys->regs, cur, next, false);
}
EXPORT_SYMBOL_GPL(mtk_mmsys_ddp_disconnect);
diff --git a/include/linux/soc/mediatek/mtk-mmsys.h b/include/linux/soc/mediatek/mtk-mmsys.h
index 2c11617..19318d2 100644
--- a/include/linux/soc/mediatek/mtk-mmsys.h
+++ b/include/linux/soc/mediatek/mtk-mmsys.h
@@ -50,6 +50,10 @@ struct mtk_mmsys_conn_funcs {
enum mtk_ddp_comp_id cur,
enum mtk_ddp_comp_id next,
bool enable);
+ void (*ovl_mout_en)(void __iomem *config_regs,
+ enum mtk_ddp_comp_id cur,
+ enum mtk_ddp_comp_id next,
+ bool enable);
void (*sel_in)(void __iomem *config_regs,
enum mtk_ddp_comp_id cur,
enum mtk_ddp_comp_id next,
--
1.8.1.1.dirty
Powered by blists - more mailing lists