Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1892489ybg; Thu, 4 Jun 2020 23:47:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwggazQ9o7JrT62NFp6Z84CQ2x2Av6N7EQCwqAnwOOJZtXm7lfqRpg9a0q1Tm8n200/iIPD X-Received: by 2002:a17:906:78b:: with SMTP id l11mr7624132ejc.427.1591339650324; Thu, 04 Jun 2020 23:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591339650; cv=none; d=google.com; s=arc-20160816; b=Sxw9IH+NNnd3weYRajFA1GG0fogAzwSHhEhLGMMgGw1mC6774Rph5d4bKfBcvYb7qU 3J7GRAYkhysOurYrSZK9sjf65jcCeSGs5tvGn7Jea9/nP6xnDnVyWlPLytcCpx2zJWX4 xI+HAGtNMIaHh+eQfSVS6j2idd5vR2F7WSGySwHVWumNKZvnV6rp7aS5A6W6CvHeZcQw ykRWTNuA2oIemsziN7t+Hw96fm1h/D5VgU3NKF3xG25vX0XUK0wYopPFSJHHgGhOfeFX 21TpNuNQvux2l96qP7EIbdHKpOnMt8PItwmBt34eZYep6SON4WPWfBi4vu9oqQn4zOl4 o3eg== 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=DH+EUa8pkMyhIjFRAfMc2rx/jnL/8y/L57qTeAixjac=; b=YYuOp3N9KiCg9THlb/Q0aFN9M0SohRkgyCdSZlYfMj4mrtFKL+obmResIbexgPc4CD vRVJ8eqOpNZNxvUDJgYDAipDG4RRep27qWPevPZbUmStR0sdDAbr8kfGRFhxabFW+27h cX7HPVKdtg/93iKzqJ3namyO97UtkSutkvvrepXBuvg+kdcE2qEjoOLDw5JZumdXuDLv /bobNWnQ3DrkiPra0Z6QXoDuUiYkO/DeZ1qtvQvR0oFKI83KPkTCHDK4YLVlFlsiu9I7 RulpEuegiL4mEgJUCJDmovw2sdMzTIdN/1i6bPWgaHXCV7iC0yt75WoQfImFBY1PGqJN bzNw== 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 h4si2961573ejg.735.2020.06.04.23.47.07; Thu, 04 Jun 2020 23:47:30 -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 S1726217AbgFEGpR (ORCPT + 99 others); Fri, 5 Jun 2020 02:45:17 -0400 Received: from inva021.nxp.com ([92.121.34.21]:57022 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726191AbgFEGpO (ORCPT ); Fri, 5 Jun 2020 02:45:14 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id D97302014AA; Fri, 5 Jun 2020 08:45:11 +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 58E402014A1; Fri, 5 Jun 2020 08:45:07 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 335EB402DF; Fri, 5 Jun 2020 14:45:01 +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 2/8] pinctrl: imx8mm: Support building as module Date: Fri, 5 Jun 2020 14:34:28 +0800 Message-Id: <1591338874-4733-3-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.MX8MM pinctrl driver as module. Signed-off-by: Anson Huang --- 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 4ca44dd..3681c4d 100644 --- a/drivers/pinctrl/freescale/Kconfig +++ b/drivers/pinctrl/freescale/Kconfig @@ -124,7 +124,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