Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp4437285ybg; Mon, 8 Jun 2020 07:52:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyO5v1tv5S2rmVlSV4uEAlsqOGBi7lT246lB71lYwBEJVGHC6vcNlGw6qsApMkM1rLkKp2X X-Received: by 2002:aa7:d952:: with SMTP id l18mr22010092eds.151.1591627935733; Mon, 08 Jun 2020 07:52:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591627935; cv=none; d=google.com; s=arc-20160816; b=qCbXpABqiWVWnxHKYq0hVBLyc3QS9maRmU8E/TaYgIAiEoKuNDK3fbWCYILR0c2BG8 +N975k0JhI1PrwInrVCwynfrUxFg0qBLbC1x08RwSzWWkEVsW82IeoEMbCIvFrG3tQoF d5/urB18TEfsuH+pT09i8rgJeh9u63ynknewCqtwe5q6wkYDLoo35jW0Rp1tne+A23Ff ilQBBFGGIXQAk/wanmbXUISlS07iLJJOMg/JAIxZ5oO76X0qijGWn8piCGYQhzdL8IOn oZEAaLuoJSUgWaf5wrGscqQEy1Z4fslmZhp5DBgey/SwejSklO2TKOrWkfCHQ7P6Ex3i jmlA== 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=buY2nZFyFJtYELuCE1HxqfBRnsm1bLtzwea8esAzR4I=; b=oVAY1mbjiUWWBqnB8pjgzoCF2lwqUI/UWE05AFSrDjnpD+LXjLjuvZwfUyqHVPVKzW bIiGNvm7IpDs2gD1fCrswyfieSucQxYdR+u9WBZ02tC5bT8+Kqv4LhWzVS0B13fL+h6o az/ieTATS6ob6bi+Upxb3vNnqpLDlx0yDocxaO1emQ6P43e6YHfmdp3MJdxG/45qzgze T9xpJo1CkFk6gNHbLgUdZLLA9ZW8I62c9OY5VkduN0EHCUN8JDs0EERaKLeE+VQhl2gN gSxnVsdidxr+moBpXexh52vJABvTVLtMQmlSgbUWPVfy1+U62LlSnkD13xng+nkraaVI AP+A== 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 y8si6863685edr.179.2020.06.08.07.51.52; Mon, 08 Jun 2020 07:52: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 S1730111AbgFHOs1 (ORCPT + 99 others); Mon, 8 Jun 2020 10:48:27 -0400 Received: from inva020.nxp.com ([92.121.34.13]:46498 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729958AbgFHOsZ (ORCPT ); Mon, 8 Jun 2020 10:48:25 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 056A11A1097; Mon, 8 Jun 2020 16:48:23 +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 7A2361A105F; Mon, 8 Jun 2020 16:48:18 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 9B41D402FB; Mon, 8 Jun 2020 22:48:12 +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 3/9] pinctrl: imx8mm: Support building as module Date: Mon, 8 Jun 2020 22:37:30 +0800 Message-Id: <1591627056-19022-4-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.MX8MM pinctrl driver as module. Signed-off-by: Anson Huang --- No changes. --- 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 58d48df..baa7e70 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