From patchwork Mon Feb 12 11:28:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryder Lee X-Patchwork-Id: 10212221 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C1DF260329 for ; Mon, 12 Feb 2018 11:30:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B05C328B0B for ; Mon, 12 Feb 2018 11:30:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A36BC22362; Mon, 12 Feb 2018 11:30:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D994122362 for ; Mon, 12 Feb 2018 11:30:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5/NTedZzhC5iP/YUDOcm8s1d3zCxgxMHL7KRmmBxnnI=; b=okFwjf1FqXa46gvbriSpzUWG0 hbtbRg53qPpJ1z00eAVl3VLibMvC5rtobZgbxXFWSkaSa4d4o9mY5p2BQSpXpvQBme7eug4F16nRn CVk0nqxiLcPQGUcZLIAKmbwVofmkro6OIYUudIRVc3swjoB26p4KP4nz1CuqQQnZvsJFJyc7O5UYP QXWOWyrMq/+XV4pndacEbCH++kTXUrRZgTrVZ/5OzBJIYR8uyr8AjzPWzHCvM8Hk4oKSFGQZm5crN 3JlQKGMAR5hJ9EmUS+BsiBc0OG+JO7kqiLFdeYwXqGulrF4YJHsM80rqrjGL42OmZE+kixJ2SboEM UJt3bO4nw==; Received: from [198.137.202.133] (helo=bombadil.infradead.org) by casper.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1elCJS-0000Hr-Br for patchwork-linux-arm@patchwork.kernel.org; Mon, 12 Feb 2018 11:30:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5/NTedZzhC5iP/YUDOcm8s1d3zCxgxMHL7KRmmBxnnI=; b=MGmfdXKbNc4Mnh QEitiVY5ZqYvTKKtEDMgUVJnR/kRVqG7LGxHrjshktV1Z0Skpfxs+oEIKKXREQlaKhTV6xieBcuX3 Vo+ci2lct5ideEXry3PfD+5GpyRoL2wEhrzb2/qlUaFTEZe3nLdZVtz0gS2GQqPI9l4lkz4ZJnfcZ gKlWkkh3jg64ntMnPn2UKexoj3/dosFvbIhKpho9Nf3Zwt2s/EMz74LSXxDydccxJEagcnkDRFsjw gmfijxLAqRxG0/7YwFfE1FwhtRdKS9qlQIgKOGLJbMuv19Kcab/fDyGv8T2ZZ/le5Xi2CEHBX7Rrw Cu7yBUqi0DOPOMDX2ilg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1elCJG-0007FO-EE; Mon, 12 Feb 2018 11:30:10 +0000 Received: from [210.61.82.184] (helo=mailgw02.mediatek.com) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1elCJ3-0006nl-U8; Mon, 12 Feb 2018 11:29:59 +0000 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 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 X-MTK: N X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Ryder Lee , Garlic Tseng , linux-kernel@vger.kernel.org, Mark Brown , linux-mediatek@lists.infradead.org, Matthias Brugger , Lee Jones , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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);