Received: by 10.223.185.116 with SMTP id b49csp2053158wrg; Mon, 12 Feb 2018 03:33:57 -0800 (PST) X-Google-Smtp-Source: AH8x225YIsg2fk6sMNr212oSID0dn5oFGW++6cOWeTr4Py42566H+r3ogXW8+77h9zvbkXkuomUb X-Received: by 10.99.189.1 with SMTP id a1mr2150545pgf.189.1518435237449; Mon, 12 Feb 2018 03:33:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518435237; cv=none; d=google.com; s=arc-20160816; b=IdydSOqeBEMAMBsuJPRby/LPSblkLZcEtSgf6hHR2iB3g4NIuWvRQ+Vx0h+pjltD7B DOLNO+nkK+5pY/kq/XhU4SEArEKLzRKVaKwOTp0pTE5G58UxVvbUcvvK86W7aYYlJIO2 pNAhDqpCPQP2YfRz1Z1+oR5jhXvhZTjX0FMRrIPJtEWAUyhz2BAmM53wuLwc1O6P7LOo M5MSts/rttcM/LWeXugtgOFvJj2dbZl0UrBR0qWGx0yQYkT11d5/avOGlMXope7N1g+p kTHZdmWABnflSkZ1oOqRu9FUt1at19EFnBna4CO7LtEqLnnZEikudf7rST3gmsekHPXO FZ4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=BkrZP8MGt81aYmNYk0iw3Dg0kttruUKpFfM0brDqhC0=; b=ntTraud8TfNTq3wKcBgknnYC0ra1H2wWVMU36qbD7+6sHM99NXDSw3ndyGuRqwGU4a rRH5IV9t9/pkv1kJGZ+RGGRgvKgrj8fvD8boE0peuz3QGxX8rtIOncQlqgDZwMzS9z4Y d8aaRUxZUly+S3CVpFLLhPRayUfHZ0MHLiDLgDyKNglyrOqxBpN83b9G3+WFvGoTw+FX jI77YbgnpXRusnBsSXIcCjr76kSmas3hr8qlOhSSz5mvF96ZkGq7FHDgy3x/f6iQ0Uzb GjFz/Jb7R0KhVCaF/bWLGa32jwx7c5f8AnfYlDtpz2PwsAwAegkm7IzbEM9ZM7PI3nGr z4dQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2si1449244pfd.316.2018.02.12.03.33.43; Mon, 12 Feb 2018 03:33:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934166AbeBLLb1 (ORCPT + 99 others); Mon, 12 Feb 2018 06:31:27 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:54341 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S934034AbeBLL3p (ORCPT ); Mon, 12 Feb 2018 06:29:45 -0500 X-UUID: da4fc280d12a4ba0a0b57216fe22e00f-20180212 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 14707721; Mon, 12 Feb 2018 19:29:40 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 12 Feb 2018 19:29:35 +0800 Received: from mtkslt306.mediatek.inc (10.21.14.136) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Mon, 12 Feb 2018 19:29:36 +0800 From: Ryder Lee To: Stephen Boyd , Rob Herring CC: Mark Brown , Lee Jones , Matthias Brugger , , , , , , Garlic Tseng , Ryder Lee Subject: [PATCH v3 2/5] clk: mediatek: modify MT7622 audsys to adapt MFD device Date: Mon, 12 Feb 2018 19:28:48 +0800 Message-ID: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As the new MFD device is in place, switch probing method to adapt it. Signed-off-by: Ryder Lee --- drivers/clk/mediatek/clk-mt7622-aud.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/clk/mediatek/clk-mt7622-aud.c b/drivers/clk/mediatek/clk-mt7622-aud.c index 13f752d..68c52a9 100644 --- a/drivers/clk/mediatek/clk-mt7622-aud.c +++ b/drivers/clk/mediatek/clk-mt7622-aud.c @@ -142,11 +142,16 @@ static int clk_mt7622_audiosys_init(struct platform_device *pdev) { struct clk_onecell_data *clk_data; struct device_node *node = pdev->dev.of_node; + struct device_node *pnode = pdev->dev.parent->of_node; int r; clk_data = mtk_alloc_clk_data(CLK_AUDIO_NR_CLK); - mtk_clk_register_gates(node, audio_clks, ARRAY_SIZE(audio_clks), + /* Check if called from MFD */ + if (!pnode) + pnode = node; + + mtk_clk_register_gates(pnode, audio_clks, ARRAY_SIZE(audio_clks), clk_data); r = of_clk_add_provider(node, of_clk_src_onecell_get, clk_data); -- 1.9.1