From patchwork Fri Aug 23 14:36:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonard Crestez X-Patchwork-Id: 11111861 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 973FD13A4 for ; Fri, 23 Aug 2019 14:37:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7FDB62339D for ; Fri, 23 Aug 2019 14:37:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2395353AbfHWOhM (ORCPT ); Fri, 23 Aug 2019 10:37:12 -0400 Received: from inva020.nxp.com ([92.121.34.13]:38472 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390787AbfHWOhL (ORCPT ); Fri, 23 Aug 2019 10:37:11 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 948681A06D1; Fri, 23 Aug 2019 16:37:09 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 87C8B1A0130; Fri, 23 Aug 2019 16:37:09 +0200 (CEST) Received: from fsr-ub1864-112.ea.freescale.net (fsr-ub1864-112.ea.freescale.net [10.171.82.98]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id A9873205D9; Fri, 23 Aug 2019 16:37:08 +0200 (CEST) From: Leonard Crestez To: Georgi Djakov , Rob Herring , =?utf-8?b?QXJ0dXIgxZp3aWdvxYQ=?= , Chanwoo Choi Cc: Alexandre Bailon , Krzysztof Kozlowski , MyungJoo Ham , Kyungmin Park , Saravana Kannan , Mark Rutland , Viresh Kumar , Shawn Guo , Dong Aisheng , Fabio Estevam , Stephen Boyd , Michael Turquette , kernel@pengutronix.de, linux-imx@nxp.com, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RFCv4 6/7] soc: imx8mm: Register interconnect platform device Date: Fri, 23 Aug 2019 17:36:59 +0300 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Since there is no virtual devicetree node representing the interconnect we need to probe the icc device externally. Probing this from the SOC driver allows the interconnect device to be built as a module. This is very similar to imx-cpufreq-dt. Signed-off-by: Leonard Crestez --- drivers/soc/imx/soc-imx8.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/soc/imx/soc-imx8.c b/drivers/soc/imx/soc-imx8.c index b9831576dd25..24d515a9fdb2 100644 --- a/drivers/soc/imx/soc-imx8.c +++ b/drivers/soc/imx/soc-imx8.c @@ -22,10 +22,11 @@ /* Same as ANADIG_DIGPROG_IMX7D */ #define ANADIG_DIGPROG_IMX8MM 0x800 struct imx8_soc_data { char *name; + char *icc_driver; u32 (*soc_revision)(void); }; static u64 soc_uid; @@ -115,10 +116,11 @@ static const struct imx8_soc_data imx8mq_soc_data = { }; static const struct imx8_soc_data imx8mm_soc_data = { .name = "i.MX8MM", .soc_revision = imx8mm_soc_revision, + .icc_driver = "imx8mm-interconnect", }; static const struct imx8_soc_data imx8mn_soc_data = { .name = "i.MX8MN", .soc_revision = imx8mm_soc_revision, @@ -185,10 +187,12 @@ static int __init imx8_soc_init(void) if (ret) goto free_rev; if (IS_ENABLED(CONFIG_ARM_IMX_CPUFREQ_DT)) platform_device_register_simple("imx-cpufreq-dt", -1, NULL, 0); + if (IS_ENABLED(CONFIG_INTERCONNECT_IMX)) + platform_device_register_simple(data->icc_driver, -1, NULL, 0); return 0; free_rev: if (strcmp(soc_dev_attr->revision, "unknown"))