Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp572150ybg; Tue, 9 Jun 2020 07:38:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2eu8sI/+Y4wdwpn9M9Z3XoXNlOF7ZjKzcJ8sAFexuBzrGqK1r9a2b3dQOfgVPtGNUcKhR X-Received: by 2002:a50:c017:: with SMTP id r23mr28373008edb.120.1591713495948; Tue, 09 Jun 2020 07:38:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591713495; cv=none; d=google.com; s=arc-20160816; b=Aht7e1qn7hr87vYJxQ3CORixDfcq4IKsfQQZ9/ubHr8gFCz4MClHJoHAV1Yv2CpluF Ma9QG/SE/xW+PAg55sAL0qAzSseZZ9my798VUNk6+DpkopvOCwZVOTI9Q55J2PItBDfR ByPOtrrGKWc8zjmSGTzXV7nn9kiywloLxWyeIRNJ49wfTu9X0W+rzXLE9W+RMqfwG+IW KdFDsT6WvQUpj2OsSoNQ35SXu5dCBpYLvIH7BLHmEFAoBcnvDfGbGua5r7s0qHtINxs7 qjzUbv67VKGVTHluUe2keaSRKDzjx7GG2x3GmIq1FBRRfaZzMAompaypYb7jpcvV01P2 XD5A== 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=P4yIkyduE5Tm3pzWPGaa8vM2nLKtRQq4o9FEwDHICgs=; b=1Eq1e+7osHGsToWZGJ5HHPQqlNcvE7eRdMW4jZMXTymJxkUKI1oaE7eO7EZyWU64vI 7tH1RUQ6aZlr8W88EmYV+ITQ0+TdVPamUYQHsQhxzVHiAwMaEXv4WPNOD9b4oYdE1RUJ ucJ0lWgLrCmePtgt/ea7p6d7BHqRXuSLvWecBCQvUo1B1MehDHdqldfPmCYltoAid3pY udiV6DY2b8F7PhgKD1Faz70vuJOzRMt+eZrBxFWEq+Gxp98im0FJQZeFQ21zICIvhbYJ eZS+Pz6MfsSYPWZYHw3+vl4/r4/iJvjztqJ7hx9O4Vvbm3/nlVB+44+NiNsyWu5TwO99 8Vuw== 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 p9si11249681ejl.1.2020.06.09.07.37.52; Tue, 09 Jun 2020 07:38:15 -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 S1730619AbgFIOc5 (ORCPT + 99 others); Tue, 9 Jun 2020 10:32:57 -0400 Received: from inva020.nxp.com ([92.121.34.13]:49136 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730463AbgFIOcS (ORCPT ); Tue, 9 Jun 2020 10:32:18 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 1E2291A13E3; Tue, 9 Jun 2020 16:32:16 +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 915D51A13DA; Tue, 9 Jun 2020 16:32: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 A5073402F3; Tue, 9 Jun 2020 22:32: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 V3 3/9] pinctrl: imx8mm: Support building as module Date: Tue, 9 Jun 2020 22:21:19 +0800 Message-Id: <1591712485-20609-4-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.MX8MM pinctrl driver as module. Signed-off-by: Anson Huang --- No change. --- drivers/pinctrl/freescale/Kconfig | 2 +- drivers/pinctrl/freescale/pinctrl-imx8mm.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/pinctrl/freescale/Kconfig b/drivers/pinctrl/freescale/Kconfig index 3383fc2..073f562 100644 --- a/drivers/pinctrl/freescale/Kconfig +++ b/drivers/pinctrl/freescale/Kconfig @@ -125,7 +125,7 @@ config PINCTRL_IMX7ULP Say Y here to enable the imx7ulp pinctrl driver config PINCTRL_IMX8MM - bool "IMX8MM pinctrl driver" + tristate "IMX8MM pinctrl driver" depends on ARCH_MXC select PINCTRL_IMX help diff --git a/drivers/pinctrl/freescale/pinctrl-imx8mm.c b/drivers/pinctrl/freescale/pinctrl-imx8mm.c index 6d1038a..eca1424 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx8mm.c +++ b/drivers/pinctrl/freescale/pinctrl-imx8mm.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -326,6 +327,7 @@ static const struct of_device_id imx8mm_pinctrl_of_match[] = { { .compatible = "fsl,imx8mm-iomuxc", .data = &imx8mm_pinctrl_info, }, { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, imx8mm_pinctrl_of_match); static int imx8mm_pinctrl_probe(struct platform_device *pdev) { @@ -340,9 +342,5 @@ static struct platform_driver imx8mm_pinctrl_driver = { }, .probe = imx8mm_pinctrl_probe, }; - -static int __init imx8mm_pinctrl_init(void) -{ - return platform_driver_register(&imx8mm_pinctrl_driver); -} -arch_initcall(imx8mm_pinctrl_init); +module_platform_driver(imx8mm_pinctrl_driver); +MODULE_LICENSE("GPL v2"); -- 2.7.4