Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1893794ybg; Thu, 4 Jun 2020 23:50:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPxW4RHv+V+6atZxpEzs4Ad3TVfOPJdSwJIUxLbIt3MbwdupMHenUwX6EhyVPUa9JwlO/n X-Received: by 2002:aa7:cd6d:: with SMTP id ca13mr7520272edb.280.1591339823645; Thu, 04 Jun 2020 23:50:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591339823; cv=none; d=google.com; s=arc-20160816; b=pDZu0Aw34XNwRbDf1WA+41+ZOA+742i0fVjHjVnEE54nvoTnkm8Iyqi/iNrl3VNngB hyPlRGQiuyw43TRWHJryj6Cred5agdtKCboXriWpcpVzEbCa+OXPxtjlFQYsR/SDDSGW 46qoe6z74iOcECq6L3Esyo83O+HUEMKIvmtDEFWU2bkWjzd4MOYj9Kb7D58kk/XJgxLf Pp9Ll43EXHXxPhro98DU3iHoUNedEr6XMXlwzUg7XCPEtwJF7GiDhbpZBTVQQcPfU7wt mNeZBYSmS4QZwOm7MDcQtOxKyyN+0na0Iijg4gSSLgKEMmZdotuhxuoRNVTdcagd5+so gk/w== 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=TEcknUTTcYP8X+tHx2dHsY9h3uZozatsAQfkyWr9/k8=; b=BOKPizrnm4Jxiz1KBw6C5COU+2sEnVcbg/F/aJwbHWMjNDR+46gGE9Uq2c2W8/S8v+ +h6vRGDFmC+jhqEVPP6s0WCh6OZQ39UtP1z7ePiAApTAVCdzZfEHwh63Ks/W07hAchQV syf0XZ5mrwnJlP2ZSFwV2D7mPIR6NwOTZdsZXjGWojsF0TrArjYHuDzmxSf/KChbFmLv /4wdYpmZzAdZqNTWMaL8aqcbhLlVusRzWDT746xRoSYathKcPxOMB8pLl4jzZX3yF0XT QLAg2snbR7ocf/Wggp4bUs4jo9Um1zahgc3wSxo6oTsDRMKJ+JUpsPWMNtx3VPXPIWLM geUg== 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 j25si2948207ejs.86.2020.06.04.23.50.00; Thu, 04 Jun 2020 23:50:23 -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 S1726088AbgFEGpj (ORCPT + 99 others); Fri, 5 Jun 2020 02:45:39 -0400 Received: from inva020.nxp.com ([92.121.34.13]:51896 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726205AbgFEGpQ (ORCPT ); Fri, 5 Jun 2020 02:45:16 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 809FC1A1F00; Fri, 5 Jun 2020 08:45:14 +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 0BAD61A1F09; Fri, 5 Jun 2020 08:45:10 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id CF3C1402B0; Fri, 5 Jun 2020 14:45:03 +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 4/8] pinctrl: imx8mq: Support building as module Date: Fri, 5 Jun 2020 14:34:30 +0800 Message-Id: <1591338874-4733-5-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.MX8MQ pinctrl driver as module. Signed-off-by: Anson Huang --- drivers/pinctrl/freescale/Kconfig | 2 +- drivers/pinctrl/freescale/pinctrl-imx8mq.c | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/pinctrl/freescale/Kconfig b/drivers/pinctrl/freescale/Kconfig index b909719..df77e752 100644 --- a/drivers/pinctrl/freescale/Kconfig +++ b/drivers/pinctrl/freescale/Kconfig @@ -145,7 +145,7 @@ config PINCTRL_IMX8MP Say Y here to enable the imx8mp pinctrl driver config PINCTRL_IMX8MQ - bool "IMX8MQ pinctrl driver" + tristate "IMX8MQ pinctrl driver" depends on ARCH_MXC select PINCTRL_IMX help diff --git a/drivers/pinctrl/freescale/pinctrl-imx8mq.c b/drivers/pinctrl/freescale/pinctrl-imx8mq.c index 50aa1c0..db5b41a 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx8mq.c +++ b/drivers/pinctrl/freescale/pinctrl-imx8mq.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -329,6 +330,7 @@ static const struct of_device_id imx8mq_pinctrl_of_match[] = { { .compatible = "fsl,imx8mq-iomuxc", .data = &imx8mq_pinctrl_info, }, { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, imx8mq_pinctrl_of_match); static int imx8mq_pinctrl_probe(struct platform_device *pdev) { @@ -345,8 +347,5 @@ static struct platform_driver imx8mq_pinctrl_driver = { .probe = imx8mq_pinctrl_probe, }; -static int __init imx8mq_pinctrl_init(void) -{ - return platform_driver_register(&imx8mq_pinctrl_driver); -} -arch_initcall(imx8mq_pinctrl_init); +module_platform_driver(imx8mq_pinctrl_driver); +MODULE_LICENSE("GPL v2"); -- 2.7.4