Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1237586ybg; Thu, 11 Jun 2020 04:48:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxveJO/q0VyUP6KvtvdqmLNNC8eDhg3S7bYjfg8CcN6wl/LlgdFBIBzqf0z7ax7gqK60UOE X-Received: by 2002:a17:906:3013:: with SMTP id 19mr7848815ejz.303.1591876094347; Thu, 11 Jun 2020 04:48:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591876094; cv=none; d=google.com; s=arc-20160816; b=NxDXvlX+gWe5FFLYzx0R+4tI2ydx5ntmMBet2rYwu4p2MSNiX6bN9CHYacBxWjXIyf v2CDT3LZww+X/DgI5iiWqQ2kdU0fxzXyDvwjKGG5U7xS2bLWXTNSq610Jz2pnsLCQ9Wd +VMDtY35P5EHz2rMMVm0onVyZno68BSRi+HEsQ71OVP7r/HWAgTn5gMXrjvCq6nPv67D V1TYQxxhYfRCYNQmAOua48R02xnVYmDsyDo6jALp+T5enKCJcfENlz5FJ2sTuS/ov9HW eRVcYnpo7hDl9qfg+tLlPlUO60lD4xCb+ZF+NQyjCqXwQ0ApXCEL7WGviyoQPh+zG/wz cXrg== 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=81k0hziAYS2awbA96AhYjZyN9C4vtFEEvxoqi63wlq0=; b=M6ngC+96KZxvRWQsi6k2yM7Yq41TaN7QJVhoRr/uNi5iMopKD9WfaK6U9c+sAl58zu 1WeWJNTG8tFYA8k2ZpwxGleo58et8RpUpg4+0fYbVKcCTOLINMQZ4/QTPpc520pvAyw1 +v/8ClvB7NLtVKJLl9DjHVPUU1NJUFXqFJuZTCwhuJLonmp1NTIXk2O56sjaCdWME5n5 Md/sPu7Az1hHR/aw5mCVRRmObgnH1R/BUL1bh5UbEpIQshegQO6jeW0skdx6EbSws+N+ lsWxWSKJFGHT+L2/yKlOG+CB7Ur+gt1P/ZwqnTOANHEtnJxvGikKuTposhZYEaU1ZKny sTfw== 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 f1si1806607ejh.665.2020.06.11.04.47.51; Thu, 11 Jun 2020 04:48:14 -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 S1727879AbgFKLp7 (ORCPT + 99 others); Thu, 11 Jun 2020 07:45:59 -0400 Received: from inva020.nxp.com ([92.121.34.13]:38388 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726407AbgFKLp6 (ORCPT ); Thu, 11 Jun 2020 07:45:58 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 513B41A0713; Thu, 11 Jun 2020 13:45:56 +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 C50A41A070A; Thu, 11 Jun 2020 13:45:51 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id E4BE4402BF; Thu, 11 Jun 2020 19:45:45 +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 V5 2/9] pinctrl: imx: Support building i.MX pinctrl driver as module Date: Thu, 11 Jun 2020 19:34:48 +0800 Message-Id: <1591875295-19427-3-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591875295-19427-1-git-send-email-Anson.Huang@nxp.com> References: <1591875295-19427-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 Export necessary functions to support building i.MX common pinctrl driver and its user to be built as module. i.MX common pinctrl driver should depend on CONFIG_OF to make sure no build error when i.MX common pinctrl driver is enabled for difference architectures without CONFIG_OF. Also, module author, description and license should be added. Signed-off-by: Anson Huang --- Changes since V4: - add module author and description. --- drivers/pinctrl/freescale/Kconfig | 3 ++- drivers/pinctrl/freescale/pinctrl-imx.c | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/freescale/Kconfig b/drivers/pinctrl/freescale/Kconfig index a3a30f1d..e281c3f 100644 --- a/drivers/pinctrl/freescale/Kconfig +++ b/drivers/pinctrl/freescale/Kconfig @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config PINCTRL_IMX - bool + tristate "IMX pinctrl driver" + depends on OF select GENERIC_PINCTRL_GROUPS select GENERIC_PINMUX_FUNCTIONS select GENERIC_PINCONF diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c index c1faae1..28be1d6 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx.c +++ b/drivers/pinctrl/freescale/pinctrl-imx.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -878,6 +879,7 @@ int imx_pinctrl_probe(struct platform_device *pdev, return pinctrl_enable(ipctl->pctl); } +EXPORT_SYMBOL_GPL(imx_pinctrl_probe); static int __maybe_unused imx_pinctrl_suspend(struct device *dev) { @@ -897,3 +899,8 @@ const struct dev_pm_ops imx_pinctrl_pm_ops = { SET_LATE_SYSTEM_SLEEP_PM_OPS(imx_pinctrl_suspend, imx_pinctrl_resume) }; +EXPORT_SYMBOL_GPL(imx_pinctrl_pm_ops); + +MODULE_AUTHOR("Linus Walleij "); +MODULE_DESCRIPTION("NXP i.MX common pinctrl driver"); +MODULE_LICENSE("GPL v2"); -- 2.7.4