Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp758042ybg; Tue, 9 Jun 2020 12:03:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4oAWYhNgxW9teogBiXEkBk0uFBwwikwwJcCEjYX3xAX4kMRwG8m8drB4YdOxjePVjeXUD X-Received: by 2002:a17:906:264a:: with SMTP id i10mr26974956ejc.210.1591729409029; Tue, 09 Jun 2020 12:03:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591729409; cv=none; d=google.com; s=arc-20160816; b=h1pCKo8EBwOumahResOnQXYrCHTD54AZSrNL1n33TNiTlYJLvX/BTaI5SBEj65myCa PLfNnxPumTgBCoPZZc1unl+CpTbpElxvu62O12WqIheZuRPR0O7QHiRHoKezaxmLh93s zj0xtsSjaJvmRMOAc6Rk8m/uagIfrt7RsEVZdm8N8wWb/WHsZ0ISwG6QAM7+W8eD1qgf lOk1m7ngiOs4TBymV/2tCImrvtxdwoawciO3GTgim83Tj2i94P0tcstQtG95zR1aWv09 PlR1sj6d0Bw3yLjIkyvsG82e8pn1oGpz72Orz9wO/dBeKJB5OC44wqf9yBLtMl7dNTj/ nAOA== 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=tlRUF3/9x3ynDD8vReu//q54GRfKb+U/meMVaQjqu2o=; b=VjI8HvKOsbDboyvr3p+k2Z/GSdoPYitcso+1cQGoZMAUkTzMp+AgNbGvh5/RYL6Qny mWHJ9dgE7kscPWttB8n77xFxz96dQE0zsq5SZ4G6wGr0UWXjh7lII3B1INv9CiBH/+U9 5uUnV1WrL/wTEgwiSAFEWmbWGoNdHt+L6swQ5OtubI7bIAgdMll2U7zs0Cpvvd05CdEu SVEKCadg5Pg/fRrO6U7pVKi/AflptwGuwFAJ5z5PZBj3l6ZvHaW40MiG++6k80HHp8aj BQysCz6b73reukLvnRYuXbgmmblWqNRkTEB/nAFGlOofQEG0vDT92yLfH24NyMsaHOVr rKfw== 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 oy15si4160907ejb.538.2020.06.09.12.03.03; Tue, 09 Jun 2020 12:03:29 -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 S1730537AbgFIOcV (ORCPT + 99 others); Tue, 9 Jun 2020 10:32:21 -0400 Received: from inva020.nxp.com ([92.121.34.13]:49164 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730477AbgFIOcT (ORCPT ); Tue, 9 Jun 2020 10:32:19 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 2FB151A13DA; Tue, 9 Jun 2020 16:32:17 +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 A34091A13CA; Tue, 9 Jun 2020 16:32:12 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id B77D0402FB; Tue, 9 Jun 2020 22:32:06 +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 4/9] pinctrl: imx8mn: Support building as module Date: Tue, 9 Jun 2020 22:21:20 +0800 Message-Id: <1591712485-20609-5-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.MX8MN pinctrl driver as module. Signed-off-by: Anson Huang --- No change. --- 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 073f562..18ef57e 100644 --- a/drivers/pinctrl/freescale/Kconfig +++ b/drivers/pinctrl/freescale/Kconfig @@ -132,7 +132,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