[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211019221127.1953001-1-f.fainelli@gmail.com>
Date: Tue, 19 Oct 2021 15:11:21 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Florian Fainelli <f.fainelli@...il.com>,
Linus Walleij <linus.walleij@...aro.org>,
Ray Jui <rjui@...adcom.com>,
Scott Branden <sbranden@...adcom.com>,
bcm-kernel-feedback-list@...adcom.com (maintainer:BROADCOM
BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...),
Nicolas Saenz Julienne <nsaenz@...nel.org>,
Jonas Gorski <jonas.gorski@...il.com>,
Álvaro Fernández Rojas
<noltari@...il.com>, Randy Dunlap <rdunlap@...radead.org>,
Marc Zyngier <maz@...nel.org>,
Jason Wang <wangborong@...rlc.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
Phil Elwell <phil@...pberrypi.com>,
linux-gpio@...r.kernel.org (open list:PIN CONTROL SUBSYSTEM),
linux-rpi-kernel@...ts.infradead.org (moderated list:BROADCOM
BCM2711/BCM2835 ARM ARCHITECTURE),
linux-arm-kernel@...ts.infradead.org (moderated list:BROADCOM
BCM2711/BCM2835 ARM ARCHITECTURE)
Subject: [PATCH] pinctrl: bcm2835: Allow building driver as a module
Update the pinctrl-bcm2835 driver to support being built as as a module
by converting it to a module_platform_driver() with the appropriate
module license, authors and description.
Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
---
drivers/pinctrl/bcm/Kconfig | 2 +-
drivers/pinctrl/bcm/pinctrl-bcm2835.c | 9 ++++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/bcm/Kconfig b/drivers/pinctrl/bcm/Kconfig
index c9c5efc92731..8fc1feedd861 100644
--- a/drivers/pinctrl/bcm/Kconfig
+++ b/drivers/pinctrl/bcm/Kconfig
@@ -18,7 +18,7 @@ config PINCTRL_BCM281XX
framework. GPIO is provided by a separate GPIO driver.
config PINCTRL_BCM2835
- bool "Broadcom BCM2835 GPIO (with PINCONF) driver"
+ tristate "Broadcom BCM2835 GPIO (with PINCONF) driver"
depends on OF && (ARCH_BCM2835 || ARCH_BRCMSTB || COMPILE_TEST)
select PINMUX
select PINCONF
diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
index 6e6fefeb21ea..2abcc6ce4eba 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
@@ -20,6 +20,7 @@
#include <linux/irqdesc.h>
#include <linux/init.h>
#include <linux/interrupt.h>
+#include <linux/module.h>
#include <linux/of_address.h>
#include <linux/of.h>
#include <linux/of_irq.h>
@@ -1332,4 +1333,10 @@ static struct platform_driver bcm2835_pinctrl_driver = {
.suppress_bind_attrs = true,
},
};
-builtin_platform_driver(bcm2835_pinctrl_driver);
+module_platform_driver(bcm2835_pinctrl_driver);
+
+MODULE_AUTHOR("Chris Boot");
+MODULE_AUTHOR("Simon Arlott");
+MODULE_AUTHOR("Stephen Warren");
+MODULE_DESCRIPTION("Broadcom BCM2835/2711 pinctrl and GPIO driver");
+MODULE_LICENSE("GPL");
--
2.25.1
Powered by blists - more mailing lists