memory: mtk-smi: Add device link for smi-sub-common
authorYong Wu <yong.wu@mediatek.com>
Tue, 14 Sep 2021 11:36:57 +0000 (19:36 +0800)
committerKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Wed, 22 Sep 2021 06:43:08 +0000 (08:43 +0200)
commit47404757702ec8aa5c8310cdf58a267081f0ce6c
tree57d42f792cc901acee10cd15a1b9fbf9102441ef
parent30b869e77a1c626190bbbe6b4e5f5382b0102ac3
memory: mtk-smi: Add device link for smi-sub-common

In mt8195, there are some larbs connect with the smi-sub-common, then
connect with smi-common.

Before we create device link between smi-larb with smi-common. If we have
sub-common, we should use device link the smi-larb and smi-sub-common,
then use device link between the smi-sub-common with smi-common. This is
for enabling clock/power automatically.

Move the device link code to a new interface for reusing.

Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Reviewed-by: Ikjoon Jang <ikjn@chromium.org>
Link: https://lore.kernel.org/r/20210914113703.31466-8-yong.wu@mediatek.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
drivers/memory/mtk-smi.c