Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp4437663ybg; Mon, 8 Jun 2020 07:52:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwS1Ww3gUCX90vd13DywxiX93tAu0PMyLe4iKzq8EvNBT3STuZmiqhnLK1hteyoFUcKXQQB X-Received: by 2002:a17:906:81d7:: with SMTP id e23mr21663961ejx.462.1591627972796; Mon, 08 Jun 2020 07:52:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591627972; cv=none; d=google.com; s=arc-20160816; b=BdfUjSKSZhPEX5cmjWla/dIT6SWJXDpmM/MyBC/GyDEsekxWSZh8Xb0EEGnixKECnm eiC7K2fRuaqt3XAc+xD2h0Xj/SyyakuX+kN/ZAvkFlseMhCQ9g6TsmamWJEoI4130bun yKsbxsdAZu6eac5vgTqchyT4KrNkSKjohUzHcRzy3mHBKpOyr+T3XkeV6Be1Fyq07fLw euYpFzYf6bJ5lV/VE72E7WkPcf0rjDSdUebS3TPJGJ+o5G9rwfXT0ZuBbClOuYJ7RSM9 +0XUAH4F36nX7o8wOrSPgyLqDvQ/W1u//IYD2zDxyFagrmD1XbS6VOD8LFUUc4coCI8S yq3Q== 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=lVV0K8R18oIe7jB6tbtfkrZ+Yw4/tOE5DO+jzn7FcC4=; b=NQgZ+oDthqvIWr6rywntzvxKDKqzO5ZePBFps+/AaMYo5xf8a2/MnvorLzjwj+ctTs fdwyyX5OMlhPcnRA4WfPwi/7G8Qrzc4r/FbMiArQIyTstTpeaLvJF5wZ26TNvIbQ1gZx UDN8r0ALtXj6oYt8gO1x4vJTKsXF4f5WpwcQ3XNzo1L8DMs77d8qEd3z0mzoIvzmRNyD 4IELqYOnL70mbGQY1aJPN6wcP8vZP5workuays94SQTHaAHYzeegRq9Ea5pKFDYUD+sV tn525CryXgd4448dPZKRCUZTvJAOf2pwgq/975k62lDRewHBDPTLO7MQwhI7lS/G7H9f 9LBw== 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 v10si9737207eda.476.2020.06.08.07.52.29; Mon, 08 Jun 2020 07:52:52 -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 S1730161AbgFHOss (ORCPT + 99 others); Mon, 8 Jun 2020 10:48:48 -0400 Received: from inva020.nxp.com ([92.121.34.13]:46582 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730108AbgFHOs2 (ORCPT ); Mon, 8 Jun 2020 10:48:28 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 482AF1A0127; Mon, 8 Jun 2020 16:48:26 +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 BCA2C1A1063; Mon, 8 Jun 2020 16:48:21 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id D9A684030C; Mon, 8 Jun 2020 22:48:15 +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 V2 6/9] pinctrl: imx8mp: Support building as module Date: Mon, 8 Jun 2020 22:37:33 +0800 Message-Id: <1591627056-19022-7-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591627056-19022-1-git-send-email-Anson.Huang@nxp.com> References: <1591627056-19022-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 changes. --- 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 f194996..8f89964 100644 --- a/drivers/pinctrl/freescale/Kconfig +++ b/drivers/pinctrl/freescale/Kconfig @@ -138,7 +138,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