Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp570986ybg; Tue, 9 Jun 2020 07:36:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdwFtX9zCnyJBHxdqNRkl/K8OgbMrZ04erIMgoE6ZKLT9jFJ2cHrBK+P36noQNrGB8J0yX X-Received: by 2002:aa7:d7cc:: with SMTP id e12mr26455919eds.70.1591713399369; Tue, 09 Jun 2020 07:36:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591713399; cv=none; d=google.com; s=arc-20160816; b=OVmKNFMCakRIAQdpK/2Uijb1psgtvVHg9/mj0KRRwTsadtepj0sNZdx+HCOUdFV196 LPVXOAvLepkdP5HLeFV5wM7zvwp/MVUTLmEk/7/hW49XFIiUpg0eJ1WYwTgQvZIb2hGZ jqOlMkjWbxZBgsdqXytK/tsoXzJRKLENop8RTU0w7Uhl3je89da0FJURodvurbK6g2mS 4Tx7z+OffxBmlF33EdMdyjUKfOnZnhFSei4FjcLWw/i3sRrrr+YU0iIkuCHN4q06h24b HXynSyGhH45Rc0ffTH4W4MmxPeGrI8zu02rtHH3J0bqLfoOf7MQugwRXBB3v9f7bBYAE RnFg== 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=OuZparr90N0vpRT6wzVFbxmOxjAV4uZzF0F30PyWUSg=; b=pwBPDGuOw3ug2Yo+ptI8T8YMmPt2HNzdrG9vWCUPgVTOVlgQ1ZMVJ+SIulOXNkJfT3 w05fXZ0PKsT0LxkUOBAQukvA5JGKzl6L8AWi9m/g6D5KG9qH1N/O1oZfjJ5QDGcjvrS7 fNzV6kjRej8wJmCmFdzod/cxAj0rR8rKDW5k92Iq6zlvyCKu4hHDT9sExq1Ydo0zgSjK ygJyelFaapma1X4KiuQoTn7V6Eqn1/Tov4G3HcsEsC1kQLMuiQRtukkDZZ12EPq+04A/ Phe2p7FYFHmgMZFLtu+yZ5n6DQ3frMZUWsg1ejv6oJq6Wt9ejvq1j9XQ26uRG7vtKgqg +3+w== 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 f7si10731591ejr.406.2020.06.09.07.36.16; Tue, 09 Jun 2020 07:36:39 -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 S1730580AbgFIOc1 (ORCPT + 99 others); Tue, 9 Jun 2020 10:32:27 -0400 Received: from inva021.nxp.com ([92.121.34.21]:37946 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730374AbgFIOcV (ORCPT ); Tue, 9 Jun 2020 10:32:21 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 452AA201234; Tue, 9 Jun 2020 16:32:19 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id B9DEC2001E8; Tue, 9 Jun 2020 16:32:14 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id DC3D64031B; Tue, 9 Jun 2020 22:32:08 +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 V3 6/9] pinctrl: imx8mp: Support building as module Date: Tue, 9 Jun 2020 22:21:22 +0800 Message-Id: <1591712485-20609-7-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591712485-20609-1-git-send-email-Anson.Huang@nxp.com> References: <1591712485-20609-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.MX8MP pinctrl driver as module. Signed-off-by: Anson Huang --- No change. --- drivers/pinctrl/freescale/Kconfig | 2 +- drivers/pinctrl/freescale/pinctrl-imx8mp.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/pinctrl/freescale/Kconfig b/drivers/pinctrl/freescale/Kconfig index a6c109e..bd68af1 100644 --- a/drivers/pinctrl/freescale/Kconfig +++ b/drivers/pinctrl/freescale/Kconfig @@ -139,7 +139,7 @@ config PINCTRL_IMX8MN Say Y here to enable the imx8mn pinctrl driver config PINCTRL_IMX8MP - bool "IMX8MP pinctrl driver" + tristate "IMX8MP pinctrl driver" depends on ARCH_MXC select PINCTRL_IMX help diff --git a/drivers/pinctrl/freescale/pinctrl-imx8mp.c b/drivers/pinctrl/freescale/pinctrl-imx8mp.c index e3f644c..f3f3bdd 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx8mp.c +++ b/drivers/pinctrl/freescale/pinctrl-imx8mp.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -324,6 +325,7 @@ static const struct of_device_id imx8mp_pinctrl_of_match[] = { { .compatible = "fsl,imx8mp-iomuxc", .data = &imx8mp_pinctrl_info, }, { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, imx8mp_pinctrl_of_match); static int imx8mp_pinctrl_probe(struct platform_device *pdev) { @@ -337,9 +339,5 @@ static struct platform_driver imx8mp_pinctrl_driver = { }, .probe = imx8mp_pinctrl_probe, }; - -static int __init imx8mp_pinctrl_init(void) -{ - return platform_driver_register(&imx8mp_pinctrl_driver); -} -arch_initcall(imx8mp_pinctrl_init); +module_platform_driver(imx8mp_pinctrl_driver); +MODULE_LICENSE("GPL v2"); -- 2.7.4