Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1893399ybg; Thu, 4 Jun 2020 23:49:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAcfbGJiMinisWgOJc0oBKiG0MLiVSMa6sy++mblRWgmGVCzlIdAe9KdOPoWE/00DS4iTB X-Received: by 2002:a17:907:2058:: with SMTP id pg24mr7007830ejb.63.1591339767776; Thu, 04 Jun 2020 23:49:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591339767; cv=none; d=google.com; s=arc-20160816; b=04b9SU38Mf8R8jddmSIBSJWa8MXmNVdb3G7ITIMlwsZTZER94DtWyDNp7b09w/1b2M qyutNlTEVp9fiHjC4plA//3y2mfHaNJ1df2f6lDaZYZS1GkGpv3iHA4d3ltF8q8/CGM4 nYacd76rXUftiCqLjuWl9+VXovoRc6+5KLAfsDBwmQZ6eN6Cl4qF5Ba10CemryWCS6LT oFp59UhhkHY9V6B9pCrU9hc9c1pngdPOwOg0CmJ5Bx1biyd8XvrZHxWcfyuoMkv86ozG 6QzxpeX4ebGAbPgY6WXn8cTWj56yWa8lUA9TKW5FHBF6JPJREA5lzPdl1lYTrzyLUyTV mOGw== 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:message-id:date :subject:cc:to:from; bh=ZsbOKjGzIGkGuS0nJsfRsICzfwK5nh+pLXNNE3KKw0A=; b=JaMA4shNuFtixj2ajhiuchLUfVXtAp89PNHQgJH5mhwAgzxKwZ0nkGB14Xm9Wacdf8 X6yJ4RwXHSwZMRhQ1H4/dwJ0T+3mmItmFqBZf7ll/NN0PTUPB9SS1okJlsgzfNQZ0Pt/ 3QUzF0k6F2jrmq3wxFJuGpqkrc+rn+qWAZhrSgeEtKfm2j5MabyLkRLczYN+Bit4TvAy hJ+txtgTRcSYSIhvknM/stic6jsMa1jxAKTfKInJGdkrMMbNiby2MTVRA9Sf2wfy/pbt u3WaE3N0ITxzSuDLrdeWEcvNZ5O3sUtXxWPhc10uqbnLLbNK4OkhXMjgqA0l+OkZr5z0 gwOQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w5si2925416edr.130.2020.06.04.23.49.05; Thu, 04 Jun 2020 23:49:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726288AbgFEGpk (ORCPT + 99 others); Fri, 5 Jun 2020 02:45:40 -0400 Received: from inva020.nxp.com ([92.121.34.13]:51798 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725986AbgFEGpQ (ORCPT ); Fri, 5 Jun 2020 02:45:16 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id D0CA51A1F11; Fri, 5 Jun 2020 08:45:13 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 50F8C1A1F01; Fri, 5 Jun 2020 08:45:09 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 868E5402A5; Fri, 5 Jun 2020 14:45:02 +0800 (SGT) From: Anson Huang To: aisheng.dong@nxp.com, festevam@gmail.com, shawnguo@kernel.org, stefan@agner.ch, kernel@pengutronix.de, linus.walleij@linaro.org, s.hauer@pengutronix.de, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Linux-imx@nxp.com Subject: [PATCH 3/8] pinctrl: imx8mn: Support building as module Date: Fri, 5 Jun 2020 14:34:29 +0800 Message-Id: <1591338874-4733-4-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591338874-4733-1-git-send-email-Anson.Huang@nxp.com> References: <1591338874-4733-1-git-send-email-Anson.Huang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Support building i.MX8MN pinctrl driver as module. Signed-off-by: Anson Huang --- drivers/pinctrl/freescale/Kconfig | 2 +- drivers/pinctrl/freescale/pinctrl-imx8mn.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/pinctrl/freescale/Kconfig b/drivers/pinctrl/freescale/Kconfig index 3681c4d..b909719 100644 --- a/drivers/pinctrl/freescale/Kconfig +++ b/drivers/pinctrl/freescale/Kconfig @@ -131,7 +131,7 @@ config PINCTRL_IMX8MM Say Y here to enable the imx8mm pinctrl driver config PINCTRL_IMX8MN - bool "IMX8MN pinctrl driver" + tristate "IMX8MN pinctrl driver" depends on ARCH_MXC select PINCTRL_IMX help diff --git a/drivers/pinctrl/freescale/pinctrl-imx8mn.c b/drivers/pinctrl/freescale/pinctrl-imx8mn.c index 100ed8c..b6db780 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx8mn.c +++ b/drivers/pinctrl/freescale/pinctrl-imx8mn.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -326,6 +327,7 @@ static const struct of_device_id imx8mn_pinctrl_of_match[] = { { .compatible = "fsl,imx8mn-iomuxc", .data = &imx8mn_pinctrl_info, }, { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, imx8mn_pinctrl_of_match); static int imx8mn_pinctrl_probe(struct platform_device *pdev) { @@ -340,9 +342,5 @@ static struct platform_driver imx8mn_pinctrl_driver = { }, .probe = imx8mn_pinctrl_probe, }; - -static int __init imx8mn_pinctrl_init(void) -{ - return platform_driver_register(&imx8mn_pinctrl_driver); -} -arch_initcall(imx8mn_pinctrl_init); +module_platform_driver(imx8mn_pinctrl_driver); +MODULE_LICENSE("GPL v2"); -- 2.7.4