Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1892523ybg; Thu, 4 Jun 2020 23:47:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCCMcOTMzkU3J8FbVad0u3jvvRCjKV+ovzSJawjrcPSHpgXfUFOdE1w+YIb6wfU7VZLLJW X-Received: by 2002:a50:cd56:: with SMTP id d22mr7608990edj.374.1591339653852; Thu, 04 Jun 2020 23:47:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591339653; cv=none; d=google.com; s=arc-20160816; b=cLI4H8MuHVitxQdsClOCz9qEsHTJp6XRNefpSClJ4r8B5LwBemlYOV2HIzYfH4h8pW PJrwGpbxRgu4ezJpZUO8SfatYvkJGZ/JnnoP5Qh2QF7MhUl8YEtZleTe46ZfF7kD3QUO NtSRtlzBjtsgOO2FWR+9ZjsoXe5F90iIPsrbw7s6GbVbeXmhbEq1FwyI2gq36aJ3mVgp gXkd70R1GjroT9LepKOwG8y9aHk5xggMrEWSt6cim5GEInvlddRWuoFvo0v8hJIAOZQq TQyje9QLKE+/Rl/1gW9Z5R1m8p+1bBNvZIiKe8Ol32P/BJfIxREVun4wH6sz5mtpAA0w fHyw== 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=N8lVYzXdMSHtUH5Ur8kAkn6xDelPnDO6FEgTEL9LuYk=; b=U5cc2FT/U2TqI8auZT0K+jDfv1yXQg1GUdD03oO4EHRJj8Jf78vl/0FR9aV48R93GG irufkp1OaSv95O8uAVvyjbeOVQycLXIZnA4ygCo31b5vyo15Hv1b72+nek686QnS83D0 QdrgLfZrdFaHeJZ4nfqsJT09MmFPo2r9k2/jdgBDUGErun6RYHRCXsAheC7q65cl6AG3 LRYO2v9RLDIsMdxl3O/Ov0TXI6R4AxVWd81t/91k8V8YPbHRE7s4i32uEBb56YXJoYDO X9ggZvwO3KU4Er5joGtGtgbeyuO+Kf8MuCx45K8Vx+mZNGDsaW7/+OMmoUXKzzsaNBoe 6Zzg== 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 f6si3045630ejr.283.2020.06.04.23.47.11; Thu, 04 Jun 2020 23:47:33 -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 S1726235AbgFEGpU (ORCPT + 99 others); Fri, 5 Jun 2020 02:45:20 -0400 Received: from inva020.nxp.com ([92.121.34.13]:52010 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726213AbgFEGpS (ORCPT ); Fri, 5 Jun 2020 02:45:18 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id DBAC21A1EF2; Fri, 5 Jun 2020 08:45:15 +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 5BFC31A1EF0; Fri, 5 Jun 2020 08:45:11 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 39F7840324; Fri, 5 Jun 2020 14:45:05 +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 5/8] pinctrl: imx8mp: Support building as module Date: Fri, 5 Jun 2020 14:34:31 +0800 Message-Id: <1591338874-4733-6-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.MX8MP pinctrl driver as module. Signed-off-by: Anson Huang --- 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 df77e752..2bf90b3 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