* [PATCH v2 1/1] mfd: stmpe: Allow building as module
@ 2025-08-19 7:04 Alexander Stein
2025-09-02 10:39 ` (subset) " Lee Jones
2025-09-04 13:04 ` Bartosz Golaszewski
0 siblings, 2 replies; 3+ messages in thread
From: Alexander Stein @ 2025-08-19 7:04 UTC (permalink / raw)
To: Lee Jones, Maxime Coquelin, Alexandre Torgue
Cc: Alexander Stein, linux-kernel, linux-stm32, linux-arm-kernel
Export the core probe and remove function to be used by i2c and spi
drivers. Also add necessary module information so the drivers can be built
as modules. This reduces footprint of the driver is enabled but unused.
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
Changes in v2:
* Improved commit message
* Remove superfluous text from module description
* Patch 1/3 and 2/3 already applied in next-20250819
v1: https://lore.kernel.org/all/20250725071153.338912-1-alexander.stein@ew.tq-group.com/
drivers/mfd/Kconfig | 10 +++++-----
drivers/mfd/stmpe.c | 6 ++++++
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index a403a3daedd52..874fee5681658 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -1539,8 +1539,8 @@ config MFD_DB8500_PRCMU
through a register map.
config MFD_STMPE
- bool "STMicroelectronics STMPE"
- depends on I2C=y || SPI_MASTER=y
+ tristate "STMicroelectronics STMPE"
+ depends on I2C || SPI_MASTER
depends on OF
select MFD_CORE
help
@@ -1568,14 +1568,14 @@ menu "STMicroelectronics STMPE Interface Drivers"
depends on MFD_STMPE
config STMPE_I2C
- bool "STMicroelectronics STMPE I2C Interface"
- depends on I2C=y
+ tristate "STMicroelectronics STMPE I2C Interface"
+ depends on I2C
default y
help
This is used to enable I2C interface of STMPE
config STMPE_SPI
- bool "STMicroelectronics STMPE SPI Interface"
+ tristate "STMicroelectronics STMPE SPI Interface"
depends on SPI_MASTER
help
This is used to enable SPI interface of STMPE
diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
index e1165f63aedae..3c5c2f157f529 100644
--- a/drivers/mfd/stmpe.c
+++ b/drivers/mfd/stmpe.c
@@ -1482,6 +1482,7 @@ int stmpe_probe(struct stmpe_client_info *ci, enum stmpe_partnum partnum)
return ret;
}
+EXPORT_SYMBOL_GPL(stmpe_probe);
void stmpe_remove(struct stmpe *stmpe)
{
@@ -1497,6 +1498,7 @@ void stmpe_remove(struct stmpe *stmpe)
mfd_remove_devices(stmpe->dev);
}
+EXPORT_SYMBOL_GPL(stmpe_remove);
static int stmpe_suspend(struct device *dev)
{
@@ -1520,3 +1522,7 @@ static int stmpe_resume(struct device *dev)
EXPORT_GPL_SIMPLE_DEV_PM_OPS(stmpe_dev_pm_ops,
stmpe_suspend, stmpe_resume);
+
+MODULE_DESCRIPTION("STMPE Core driver");
+MODULE_AUTHOR("Rabin Vincent <rabin.vincent@stericsson.com>");
+MODULE_LICENSE("GPL");
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: (subset) [PATCH v2 1/1] mfd: stmpe: Allow building as module
2025-08-19 7:04 [PATCH v2 1/1] mfd: stmpe: Allow building as module Alexander Stein
@ 2025-09-02 10:39 ` Lee Jones
2025-09-04 13:04 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2025-09-02 10:39 UTC (permalink / raw)
To: Lee Jones, Maxime Coquelin, Alexandre Torgue, Alexander Stein
Cc: linux-kernel, linux-stm32, linux-arm-kernel
On Tue, 19 Aug 2025 09:04:57 +0200, Alexander Stein wrote:
> Export the core probe and remove function to be used by i2c and spi
> drivers. Also add necessary module information so the drivers can be built
> as modules. This reduces footprint of the driver is enabled but unused.
>
>
Applied, thanks!
[1/1] mfd: stmpe: Allow building as module
commit: aa8d4c73e99e8a4612eb4a598f2b29b141a9703c
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/1] mfd: stmpe: Allow building as module
2025-08-19 7:04 [PATCH v2 1/1] mfd: stmpe: Allow building as module Alexander Stein
2025-09-02 10:39 ` (subset) " Lee Jones
@ 2025-09-04 13:04 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2025-09-04 13:04 UTC (permalink / raw)
To: Lee Jones, Maxime Coquelin, Alexandre Torgue, Alexander Stein
Cc: Bartosz Golaszewski, linux-kernel, linux-stm32, linux-arm-kernel
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
On Tue, 19 Aug 2025 09:04:57 +0200, Alexander Stein wrote:
> Export the core probe and remove function to be used by i2c and spi
> drivers. Also add necessary module information so the drivers can be built
> as modules. This reduces footprint of the driver is enabled but unused.
>
>
Applied, thanks!
[1/1] mfd: stmpe: Allow building as module
https://git.kernel.org/brgl/linux/c/df6a44003953fb23ad67f82d299e439e7ff7150a
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-04 13:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-19 7:04 [PATCH v2 1/1] mfd: stmpe: Allow building as module Alexander Stein
2025-09-02 10:39 ` (subset) " Lee Jones
2025-09-04 13:04 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®