Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4685550pxu; Tue, 13 Oct 2020 04:56:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZH9J0AlPtp55dr7xYghx+iIVz7H6f1B1m7vjdE13jlBINd4IfvuoDV6WNqCE6hFF+7kp4 X-Received: by 2002:a17:906:388d:: with SMTP id q13mr11301756ejd.92.1602590178565; Tue, 13 Oct 2020 04:56:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602590178; cv=none; d=google.com; s=arc-20160816; b=SKJjJMHkYtidwEyI5P+WqXswwqqp8A7fWy0LeWEGWfIuAjacm99+MnKcakOjq2m/6p 6daLH2qGeWpd8c0WM/VkAgjLeC9BHz8knxmjcQdgytLtZQ35yX2DZT0QG4691Xd8BR4S oNRXxHm3TUqo12l5cYZZe0dZ6n/XFwBhPmmoVPDNlOaz9aIg52VVW+3U6bASwvk+hG1G bPVITtJ6995IDXyrvsztn3mXd4CglVAfZUK4razGvmLi5b+MErq67apg/4jgoi9gKUhU Kl19eTsl7f3W7R/IdiGKfaTUXZC1TXz6sBN++Urdo483G7xtVLL5tI2x7fyfAl7VmVZj EY3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=LLL36pA4DasF9U6N08lYPOwq2wGb+6IImlFxNa1RY6A=; b=TA/n+P/ZzD+w9iv6w1JgMsjQxehfu6u2RhQUQpWz7BlXlG5JBVetuqLOszRzLgzmTs dDnLReF0klS3kPU37x+a92zNJnE7mwvXMoDos9018b0xQp0emcoP0YS4gcjJXunRCKIa JcK7QNPG6K9B0oWFaggpgnUWttaQ+ZhlC/fUWF4b6xODAuhzfJ/k+6wZ3dX77Hq1Fvzv WgImk8di5lFAjHPugAsUkW03Ipbi/00c33lHI6F1GlSODYun04y7WdG/Q/EVjH+kyCOI pyAVbPCquzGXI3I/0doDCq4AR+RvIAdeUQ8H1ZxahDWzAwiieJeWk7Sw63vrO7GbFAkl TfDA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m27si14393096ejb.476.2020.10.13.04.55.55; Tue, 13 Oct 2020 04:56:18 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389737AbgJMGoP (ORCPT + 99 others); Tue, 13 Oct 2020 02:44:15 -0400 Received: from lucky1.263xmail.com ([211.157.147.130]:48184 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389638AbgJMGoE (ORCPT ); Tue, 13 Oct 2020 02:44:04 -0400 Received: from localhost (unknown [192.168.167.16]) by lucky1.263xmail.com (Postfix) with ESMTP id 8BA22CCD3B; Tue, 13 Oct 2020 14:37:34 +0800 (CST) X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-ADDR-CHECKED4: 1 X-ANTISPAM-LEVEL: 2 X-ABS-CHECKED: 0 Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.263.net (postfix) whith ESMTP id P30218T139798958167808S1602571053396950_; Tue, 13 Oct 2020 14:37:34 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: <61acd240078281ebd28490af1f12a39f> X-RL-SENDER: jay.xu@rock-chips.com X-SENDER: xjq@rock-chips.com X-LOGIN-NAME: jay.xu@rock-chips.com X-FST-TO: linus.walleij@linaro.org X-SENDER-IP: 58.22.7.114 X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 X-System-Flag: 0 From: Jianqun Xu To: linus.walleij@linaro.org, heiko@sntech.de Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Jianqun Xu Subject: [PATCH v3 1/3] pinctrl: rockchip: make driver be tristate module Date: Tue, 13 Oct 2020 14:37:29 +0800 Message-Id: <20201013063731.3618-2-jay.xu@rock-chips.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201013063731.3618-1-jay.xu@rock-chips.com> References: <20201013063731.3618-1-jay.xu@rock-chips.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make pinctrl-rockchip driver to be tristate module, support to build as a module, this is useful for GKI. Reviewed-by: Heiko Stuebner Signed-off-by: Jianqun Xu --- drivers/pinctrl/Kconfig | 2 +- drivers/pinctrl/pinctrl-rockchip.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index 815095326e2d..bc9774c1ae8d 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig @@ -207,7 +207,7 @@ config PINCTRL_OXNAS select MFD_SYSCON config PINCTRL_ROCKCHIP - bool + tristate "Rockchip gpio and pinctrl driver" depends on OF select PINMUX select GENERIC_PINCONF diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index 0401c1da79dd..927d132d6716 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c @@ -16,10 +16,12 @@ */ #include +#include #include #include #include #include +#include #include #include #include @@ -4258,3 +4260,14 @@ static int __init rockchip_pinctrl_drv_register(void) return platform_driver_register(&rockchip_pinctrl_driver); } postcore_initcall(rockchip_pinctrl_drv_register); + +static void __exit rockchip_pinctrl_drv_unregister(void) +{ + platform_driver_unregister(&rockchip_pinctrl_driver); +} +module_exit(rockchip_pinctrl_drv_unregister); + +MODULE_DESCRIPTION("ROCKCHIP Pin Controller Driver"); +MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:pinctrl-rockchip"); +MODULE_DEVICE_TABLE(of, rockchip_pinctrl_dt_match); -- 2.17.1