Received: by 10.192.165.148 with SMTP id m20csp4528529imm; Tue, 24 Apr 2018 04:26:39 -0700 (PDT) X-Google-Smtp-Source: AIpwx4//ztE1zGmoZPZOtuXPWVgZtSVLTxw24HE2g3B7CfnRAI+t3SzjJ9pjshxlRCoOwS03UM1H X-Received: by 10.98.25.133 with SMTP id 127mr23650363pfz.131.1524569199004; Tue, 24 Apr 2018 04:26:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524569198; cv=none; d=google.com; s=arc-20160816; b=tti7KlMrXFjdmt8r1yR/Qr8IHV3i1gc3icog3jpcQ7mVgdFFpFm6e4f71ywTeqbNJZ wUnGcvhd5qRDEF5DIAjlT4YiuKwWlNNt0ol6lRxEBMA+y7eURTruvGNKpAwy5gqtYCfu uGHogJsCNei7nTO6hFlnNauFeRdCGR1LPvnZBl2X0c7hrJmuyxWKtBdLP1RASrGt3oDx rqXFeYtLEq8bSWkGmz3sHuAh4uEtp5csnm6qU0r4unn/O1BBfzOmvyleP90S76c3qoiz ei9WBGppfs5yOIk+N5qOWttTCsUqMieCGIfJ/VlA7WHhEp0ojmFEoUPZfIw0AEu9bCeP 5f2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dmarc-filter :arc-authentication-results; bh=A5hZS+UhgLTjIpjMgjBxJPj/Q1Y4fy0BmYqmXfIEoC4=; b=MDGZcqCc0souSE/8Y7Huv32TEHLxUx65Z8pvFmZVZ9jZGtkO/542+WnWBs2a8g0igf mJj9X6wBIH5WEBoY7ozgqGGytoj5ewwRMSYWYHSa+MAyFN6H6MCLdyLGHVYa7xTSY2zB lgMaIJNBCslccbtJSxAjbs1/k4ffe4fep5PsGgul0rgUIxM5dEmU/r/Q/10ca2UwCQGh S+x2rJd8Han1MSd+92LSP0wOtyxhsjQESUFhD4fNZlZc/JNa3UydmTIwrHn9evcV+d4u mOQkpGg9IxKiplwGlzsjCIEv9WGY4aGprKvc8Og3X7P8NSEaWZwLQpW5pEHbwJyIsmHF FcnA== 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 h32-v6si13319002pld.170.2018.04.24.04.26.24; Tue, 24 Apr 2018 04:26:38 -0700 (PDT) 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 S1756719AbeDXJsI (ORCPT + 99 others); Tue, 24 Apr 2018 05:48:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:48074 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756234AbeDXJsD (ORCPT ); Tue, 24 Apr 2018 05:48:03 -0400 Received: from ziggy.de (144.pool85-56-49.dynamic.orange.es [85.56.49.144]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 91B472183C; Tue, 24 Apr 2018 09:47:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 91B472183C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=matthias.bgg@kernel.org From: matthias.bgg@kernel.org To: ulrich.hecht+renesas@gmail.com, laurent.pinchart@ideasonboard.com, ck.hu@mediatek.com, p.zabel@pengutronix.de, airlied@linux.ie, robh+dt@kernel.org, mark.rutland@arm.com, mturquette@baylibre.com, sboyd@codeaurora.org, lee.jones@linaro.org Cc: davem@davemloft.net, gregkh@linuxfoundation.org, mchehab@kernel.org, rdunlap@infradead.org, pi-cheng.chen@linaro.org, sean.wang@mediatek.com, linux-clk@vger.kernel.org, linux@armlinux.org.uk, matthias.bgg@gmail.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Matthias Brugger Subject: [v2 resend 08/10] clk: mediatek: mt8173-mm: switch to mfd device Date: Tue, 24 Apr 2018 11:47:05 +0200 Message-Id: <74bf4058534cf187e10ef041da1706878914aa45.1524563001.git.mbrugger@suse.com> X-Mailer: git-send-email 2.16.3 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Matthias Brugger As the new mfd device is in place, switch probing for the MMSYS to support invocation from the mfd device. Signed-off-by: Matthias Brugger Acked-by: Stephen Boyd --- drivers/clk/mediatek/clk-mt8173.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/clk/mediatek/clk-mt8173.c b/drivers/clk/mediatek/clk-mt8173.c index 96c292c3e440..abd2592078d4 100644 --- a/drivers/clk/mediatek/clk-mt8173.c +++ b/drivers/clk/mediatek/clk-mt8173.c @@ -15,6 +15,7 @@ #include #include #include +#include #include "clk-mtk.h" #include "clk-gate.h" @@ -1152,10 +1153,13 @@ static void __init mtk_imgsys_init(struct device_node *node) } CLK_OF_DECLARE(mtk_imgsys, "mediatek,mt8173-imgsys", mtk_imgsys_init); -static void __init mtk_mmsys_init(struct device_node *node) +static int mtk_mmsys_probe(struct platform_device *pdev) { struct clk_onecell_data *clk_data; int r; + struct device_node *node; + + node = pdev->dev.parent->of_node; clk_data = mtk_alloc_clk_data(CLK_MM_NR_CLK); @@ -1166,8 +1170,17 @@ static void __init mtk_mmsys_init(struct device_node *node) if (r) pr_err("%s(): could not register clock provider: %d\n", __func__, r); + + return r; } -CLK_OF_DECLARE(mtk_mmsys, "mediatek,mt8173-mmsys", mtk_mmsys_init); + +static struct platform_driver clk_mt8173_mm_drv = { + .probe = mtk_mmsys_probe, + .driver = { + .name = "clk-mt8173-mm", + }, +}; +builtin_platform_driver(clk_mt8173_mm_drv); static void __init mtk_vdecsys_init(struct device_node *node) { -- 2.16.3