Skip to content

Commit 510f821

Browse files
Nicolas FrattaroliGeorgi Djakov
authored andcommitted
interconnect: mediatek: Don't hijack parent device
If the intention is that users of the interconnect declare their relationship to the child icc_emi node of the dvfsrc controller, then this code never worked. That's because it uses the parent dvfsrc device as the device it passes to the interconnect core framework, which means all the OF parsing is broken. Use the actual device instead, and pass the dvfsrc parent into the dvfsrc calls. Fixes: b452937 ("interconnect: mediatek: Add MediaTek MT8183/8195 EMI Interconnect driver") Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com> Link: https://lore.kernel.org/r/20251124-mt8196-dvfsrc-v2-12-d9c1334db9f3@collabora.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
1 parent ce69a97 commit 510f821

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/interconnect/mediatek/icc-emi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ static int mtk_emi_icc_set(struct icc_node *src, struct icc_node *dst)
4040
if (unlikely(!src->provider))
4141
return -EINVAL;
4242

43-
dev = src->provider->dev;
43+
dev = src->provider->dev->parent;
4444

4545
switch (node->ep) {
4646
case 0:
@@ -97,7 +97,7 @@ int mtk_emi_icc_probe(struct platform_device *pdev)
9797
if (!data)
9898
return -ENOMEM;
9999

100-
provider->dev = pdev->dev.parent;
100+
provider->dev = dev;
101101
provider->set = mtk_emi_icc_set;
102102
provider->aggregate = mtk_emi_icc_aggregate;
103103
provider->xlate = of_icc_xlate_onecell;

0 commit comments

Comments
 (0)