Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3184111pxk; Mon, 7 Sep 2020 05:49:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3JpPazZkNe/IXjrjqxB4VC+WQCG2tLoc+2yDbShKhZEnJ9sDEiMnctIHuddZSCR4xF2GR X-Received: by 2002:a17:907:2173:: with SMTP id rl19mr20357906ejb.514.1599482984523; Mon, 07 Sep 2020 05:49:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599482984; cv=none; d=google.com; s=arc-20160816; b=o7wMBW8bPnuCS7q4vRWeJIwSefAh4ekkHVmVFDYtP2YFZfSYyRNsj2E2vse4ktPHv/ lYDFPDd1xPcOSN9Vg+HDY2f9Her3ndzCxO9gpXkInioJ8A4wONXQdY6OA6ZAPCMCT3s5 OivxrU/iE3LFORVXKO6C+EgDu5qRfQAF0YWRfBquuzGWrL9wvPw9krsebZrF65Vmbhhl Lc7MaxS/iQP70A/kjvha93XEdMRw0+AoKWwt7i1xu8/DddvCTr5898pGOxbha7ZhoWoe wsnY2fcCkeKAbNp46eRQxG/8pJzb0p+ojsTWsQs8TeTQnpOWO/TkV0I6/uwu/iCw7jZg Lq1g== 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=T/fCLH6outfCKDrwVFHrsNmxsyGhIxCD3iYzvpd8MUg=; b=UUSps74y5zfhL2Z6GwNAuMBK6R7WQTyBqyKMT4hSNhvf1m75i1D3rFc6dIitxqG3uD WXN38wJ6XAr3givOJHN2OKMXUp21Siij0vxagLbCI+6IxciTvQSGnH/2NmDx73yI02XZ co10ig4smC216NpiDIvzeAQTR192faBbbN0BCyDgCEtM9KKveBxrACXVRgMvHBV/hItN mGUaiEKhrXYcDU19xARnfsoPruJHiWacUGazaV8n0KoSPK7Q9WU8voL2IWbW2ddLZxi0 yWq2WIfhQMAZgRVaP8M9oe8I9x9oPno1J/CTAPNXVyOEFZP+VdHSF1x9hs3wSEmxgccy luQA== 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 p23si8447838edt.386.2020.09.07.05.49.22; Mon, 07 Sep 2020 05:49:44 -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 S1729233AbgIGMrm (ORCPT + 99 others); Mon, 7 Sep 2020 08:47:42 -0400 Received: from inva021.nxp.com ([92.121.34.21]:51858 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729155AbgIGMke (ORCPT ); Mon, 7 Sep 2020 08:40:34 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 301AB2000D4; Mon, 7 Sep 2020 14:40:28 +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 AA23E200E9A; Mon, 7 Sep 2020 14:40:23 +0200 (CEST) Received: from 10.192.242.69 (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 35DD1402DD; Mon, 7 Sep 2020 14:40:18 +0200 (CEST) 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 2/3] pinctrl: imx: Support building SCU pinctrl core driver as module Date: Mon, 7 Sep 2020 20:32:32 +0800 Message-Id: <1599481953-32704-2-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1599481953-32704-1-git-send-email-Anson.Huang@nxp.com> References: <1599481953-32704-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 Change PINCTR_IMX_SCU to tristate, remove unnecessary #ifdef and add module author, description and license to support building SCU pinctrl core driver as module. Signed-off-by: Anson Huang --- Changes since V1: - split V1 [1/2] patch to 2 patches, this patch supports building SCU pinctrl core driver as module; - remove unnecessary #ifdef check and #else block. --- drivers/pinctrl/freescale/Kconfig | 2 +- drivers/pinctrl/freescale/pinctrl-imx.h | 20 -------------------- drivers/pinctrl/freescale/pinctrl-scu.c | 5 +++++ 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/drivers/pinctrl/freescale/Kconfig b/drivers/pinctrl/freescale/Kconfig index 08fcf5c..452c499 100644 --- a/drivers/pinctrl/freescale/Kconfig +++ b/drivers/pinctrl/freescale/Kconfig @@ -7,7 +7,7 @@ config PINCTRL_IMX select REGMAP config PINCTRL_IMX_SCU - bool + tristate "IMX SCU pinctrl core driver" depends on IMX_SCU select PINCTRL_IMX diff --git a/drivers/pinctrl/freescale/pinctrl-imx.h b/drivers/pinctrl/freescale/pinctrl-imx.h index 40927ca..fd8c4b6 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx.h +++ b/drivers/pinctrl/freescale/pinctrl-imx.h @@ -144,7 +144,6 @@ struct imx_pinctrl_soc_info { int imx_pinctrl_probe(struct platform_device *pdev, const struct imx_pinctrl_soc_info *info); -#ifdef CONFIG_PINCTRL_IMX_SCU #define BM_PAD_CTL_GP_ENABLE BIT(30) #define BM_PAD_CTL_IFMUX_ENABLE BIT(31) #define BP_PAD_CTL_IFMUX 27 @@ -157,23 +156,4 @@ int imx_pinconf_set_scu(struct pinctrl_dev *pctldev, unsigned pin_id, void imx_pinctrl_parse_pin_scu(struct imx_pinctrl *ipctl, unsigned int *pin_id, struct imx_pin *pin, const __be32 **list_p); -#else -static inline int imx_pinconf_get_scu(struct pinctrl_dev *pctldev, - unsigned pin_id, unsigned long *config) -{ - return -EINVAL; -} -static inline int imx_pinconf_set_scu(struct pinctrl_dev *pctldev, - unsigned pin_id, unsigned long *configs, - unsigned num_configs) -{ - return -EINVAL; -} -static inline void imx_pinctrl_parse_pin_scu(struct imx_pinctrl *ipctl, - unsigned int *pin_id, - struct imx_pin *pin, - const __be32 **list_p) -{ -} -#endif #endif /* __DRIVERS_PINCTRL_IMX_H */ diff --git a/drivers/pinctrl/freescale/pinctrl-scu.c b/drivers/pinctrl/freescale/pinctrl-scu.c index 9df45d3..59b5f8a 100644 --- a/drivers/pinctrl/freescale/pinctrl-scu.c +++ b/drivers/pinctrl/freescale/pinctrl-scu.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -123,3 +124,7 @@ void imx_pinctrl_parse_pin_scu(struct imx_pinctrl *ipctl, pin_scu->mux_mode, pin_scu->config); } EXPORT_SYMBOL_GPL(imx_pinctrl_parse_pin_scu); + +MODULE_AUTHOR("Dong Aisheng "); +MODULE_DESCRIPTION("NXP i.MX SCU common pinctrl driver"); +MODULE_LICENSE("GPL v2"); -- 2.7.4