* [PATCH] mfd: arizona: Allow building arizona MFD-core as module
@ 2021-05-21 13:50 ` Hans de Goede
0 siblings, 0 replies; 6+ messages in thread
From: Hans de Goede @ 2021-05-21 13:50 UTC (permalink / raw)
To: Lee Jones, Liam Girdwood, Mark Brown
Cc: Hans de Goede, linux-kernel, Charles Keepax, patches, alsa-devel
There is no reason why the arizona core,irq and codec model specific
regmap bits cannot be build as a module. All they do is export symbols
which are used by the arizona-spi/i2c and arizona-codec modules, which
themselves can be built as module.
Change the Kconfig and Makefile arizona bits so that the arizona MFD-core
can be built as a module.
This is especially useful on x86 platforms with a WM5102 codec, this
allows the arizona MFD driver necessary for the WM5102 codec to be
enabled in generic distro-kernels without growing the base kernel-image
size.
Note this also adds an explicit "depends on MFD_ARIZONA" to all the
arizona codec Kconfig options. The codec drivers use functions from mfd
arizona-core. These new depends are necessary to disallow the codec
drivers being builtin when the arizona-core is build as a module,
otherwise we end up with missing symbol errors when building vmlinuz.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
Changes in v2:
- Add explicit "depends on MFD_ARIZONA" to all the arizona codec Kconfigs
---
drivers/mfd/Kconfig | 2 +-
drivers/mfd/Makefile | 14 +++++++-------
drivers/mfd/arizona-core.c | 2 ++
sound/soc/codecs/Kconfig | 10 +++++-----
4 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 5c7f2b100191..3fb048361b11 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -1788,7 +1788,7 @@ config MFD_ARIZONA
select REGMAP
select REGMAP_IRQ
select MFD_CORE
- bool
+ tristate
config MFD_ARIZONA_I2C
tristate "Cirrus Logic/Wolfson Microelectronics Arizona platform with I2C"
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
index 4f6d2b8a5f76..ebc9b6704e87 100644
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -41,24 +41,24 @@ obj-$(CONFIG_MFD_TQMX86) += tqmx86.o
obj-$(CONFIG_MFD_LOCHNAGAR) += lochnagar-i2c.o
-obj-$(CONFIG_MFD_ARIZONA) += arizona-core.o
-obj-$(CONFIG_MFD_ARIZONA) += arizona-irq.o
+arizona-objs := arizona-core.o arizona-irq.o
+obj-$(CONFIG_MFD_ARIZONA) += arizona.o
obj-$(CONFIG_MFD_ARIZONA_I2C) += arizona-i2c.o
obj-$(CONFIG_MFD_ARIZONA_SPI) += arizona-spi.o
ifeq ($(CONFIG_MFD_WM5102),y)
-obj-$(CONFIG_MFD_ARIZONA) += wm5102-tables.o
+arizona-objs += wm5102-tables.o
endif
ifeq ($(CONFIG_MFD_WM5110),y)
-obj-$(CONFIG_MFD_ARIZONA) += wm5110-tables.o
+arizona-objs += wm5110-tables.o
endif
ifeq ($(CONFIG_MFD_WM8997),y)
-obj-$(CONFIG_MFD_ARIZONA) += wm8997-tables.o
+arizona-objs += wm8997-tables.o
endif
ifeq ($(CONFIG_MFD_WM8998),y)
-obj-$(CONFIG_MFD_ARIZONA) += wm8998-tables.o
+arizona-objs += wm8998-tables.o
endif
ifeq ($(CONFIG_MFD_CS47L24),y)
-obj-$(CONFIG_MFD_ARIZONA) += cs47l24-tables.o
+arizona-objs += cs47l24-tables.o
endif
obj-$(CONFIG_MFD_WCD934X) += wcd934x.o
obj-$(CONFIG_MFD_WM8400) += wm8400-core.o
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index ce6fe6de34f8..9323b1e3a69e 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -1447,3 +1447,5 @@ int arizona_dev_exit(struct arizona *arizona)
return 0;
}
EXPORT_SYMBOL_GPL(arizona_dev_exit);
+
+MODULE_LICENSE("GPL v2");
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 2a7b3e363069..45aa92598066 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -689,7 +689,7 @@ config SND_SOC_CS47L15
config SND_SOC_CS47L24
tristate
- depends on MFD_CS47L24
+ depends on MFD_CS47L24 && MFD_ARIZONA
config SND_SOC_CS47L35
tristate
@@ -1558,11 +1558,11 @@ config SND_SOC_WM5100
config SND_SOC_WM5102
tristate
- depends on MFD_WM5102
+ depends on MFD_WM5102 && MFD_ARIZONA
config SND_SOC_WM5110
tristate
- depends on MFD_WM5110
+ depends on MFD_WM5110 && MFD_ARIZONA
config SND_SOC_WM8350
tristate
@@ -1727,11 +1727,11 @@ config SND_SOC_WM8996
config SND_SOC_WM8997
tristate
- depends on MFD_WM8997
+ depends on MFD_WM8997 && MFD_ARIZONA
config SND_SOC_WM8998
tristate
- depends on MFD_WM8998
+ depends on MFD_WM8998 && MFD_ARIZONA
config SND_SOC_WM9081
tristate
--
2.31.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] mfd: arizona: Allow building arizona MFD-core as module
@ 2021-05-21 13:50 ` Hans de Goede
0 siblings, 0 replies; 6+ messages in thread
From: Hans de Goede @ 2021-05-21 13:50 UTC (permalink / raw)
To: Lee Jones, Liam Girdwood, Mark Brown
Cc: Hans de Goede, alsa-devel, Charles Keepax, linux-kernel, patches
There is no reason why the arizona core,irq and codec model specific
regmap bits cannot be build as a module. All they do is export symbols
which are used by the arizona-spi/i2c and arizona-codec modules, which
themselves can be built as module.
Change the Kconfig and Makefile arizona bits so that the arizona MFD-core
can be built as a module.
This is especially useful on x86 platforms with a WM5102 codec, this
allows the arizona MFD driver necessary for the WM5102 codec to be
enabled in generic distro-kernels without growing the base kernel-image
size.
Note this also adds an explicit "depends on MFD_ARIZONA" to all the
arizona codec Kconfig options. The codec drivers use functions from mfd
arizona-core. These new depends are necessary to disallow the codec
drivers being builtin when the arizona-core is build as a module,
otherwise we end up with missing symbol errors when building vmlinuz.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
Changes in v2:
- Add explicit "depends on MFD_ARIZONA" to all the arizona codec Kconfigs
---
drivers/mfd/Kconfig | 2 +-
drivers/mfd/Makefile | 14 +++++++-------
drivers/mfd/arizona-core.c | 2 ++
sound/soc/codecs/Kconfig | 10 +++++-----
4 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 5c7f2b100191..3fb048361b11 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -1788,7 +1788,7 @@ config MFD_ARIZONA
select REGMAP
select REGMAP_IRQ
select MFD_CORE
- bool
+ tristate
config MFD_ARIZONA_I2C
tristate "Cirrus Logic/Wolfson Microelectronics Arizona platform with I2C"
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
index 4f6d2b8a5f76..ebc9b6704e87 100644
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -41,24 +41,24 @@ obj-$(CONFIG_MFD_TQMX86) += tqmx86.o
obj-$(CONFIG_MFD_LOCHNAGAR) += lochnagar-i2c.o
-obj-$(CONFIG_MFD_ARIZONA) += arizona-core.o
-obj-$(CONFIG_MFD_ARIZONA) += arizona-irq.o
+arizona-objs := arizona-core.o arizona-irq.o
+obj-$(CONFIG_MFD_ARIZONA) += arizona.o
obj-$(CONFIG_MFD_ARIZONA_I2C) += arizona-i2c.o
obj-$(CONFIG_MFD_ARIZONA_SPI) += arizona-spi.o
ifeq ($(CONFIG_MFD_WM5102),y)
-obj-$(CONFIG_MFD_ARIZONA) += wm5102-tables.o
+arizona-objs += wm5102-tables.o
endif
ifeq ($(CONFIG_MFD_WM5110),y)
-obj-$(CONFIG_MFD_ARIZONA) += wm5110-tables.o
+arizona-objs += wm5110-tables.o
endif
ifeq ($(CONFIG_MFD_WM8997),y)
-obj-$(CONFIG_MFD_ARIZONA) += wm8997-tables.o
+arizona-objs += wm8997-tables.o
endif
ifeq ($(CONFIG_MFD_WM8998),y)
-obj-$(CONFIG_MFD_ARIZONA) += wm8998-tables.o
+arizona-objs += wm8998-tables.o
endif
ifeq ($(CONFIG_MFD_CS47L24),y)
-obj-$(CONFIG_MFD_ARIZONA) += cs47l24-tables.o
+arizona-objs += cs47l24-tables.o
endif
obj-$(CONFIG_MFD_WCD934X) += wcd934x.o
obj-$(CONFIG_MFD_WM8400) += wm8400-core.o
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index ce6fe6de34f8..9323b1e3a69e 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -1447,3 +1447,5 @@ int arizona_dev_exit(struct arizona *arizona)
return 0;
}
EXPORT_SYMBOL_GPL(arizona_dev_exit);
+
+MODULE_LICENSE("GPL v2");
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 2a7b3e363069..45aa92598066 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -689,7 +689,7 @@ config SND_SOC_CS47L15
config SND_SOC_CS47L24
tristate
- depends on MFD_CS47L24
+ depends on MFD_CS47L24 && MFD_ARIZONA
config SND_SOC_CS47L35
tristate
@@ -1558,11 +1558,11 @@ config SND_SOC_WM5100
config SND_SOC_WM5102
tristate
- depends on MFD_WM5102
+ depends on MFD_WM5102 && MFD_ARIZONA
config SND_SOC_WM5110
tristate
- depends on MFD_WM5110
+ depends on MFD_WM5110 && MFD_ARIZONA
config SND_SOC_WM8350
tristate
@@ -1727,11 +1727,11 @@ config SND_SOC_WM8996
config SND_SOC_WM8997
tristate
- depends on MFD_WM8997
+ depends on MFD_WM8997 && MFD_ARIZONA
config SND_SOC_WM8998
tristate
- depends on MFD_WM8998
+ depends on MFD_WM8998 && MFD_ARIZONA
config SND_SOC_WM9081
tristate
--
2.31.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] mfd: arizona: Allow building arizona MFD-core as module
2021-05-21 13:50 ` Hans de Goede
@ 2021-05-21 15:09 ` Charles Keepax
-1 siblings, 0 replies; 6+ messages in thread
From: Charles Keepax @ 2021-05-21 15:09 UTC (permalink / raw)
To: Hans de Goede
Cc: Lee Jones, Liam Girdwood, Mark Brown, linux-kernel, patches, alsa-devel
On Fri, May 21, 2021 at 03:50:23PM +0200, Hans de Goede wrote:
> There is no reason why the arizona core,irq and codec model specific
> regmap bits cannot be build as a module. All they do is export symbols
> which are used by the arizona-spi/i2c and arizona-codec modules, which
> themselves can be built as module.
>
> Change the Kconfig and Makefile arizona bits so that the arizona MFD-core
> can be built as a module.
>
> This is especially useful on x86 platforms with a WM5102 codec, this
> allows the arizona MFD driver necessary for the WM5102 codec to be
> enabled in generic distro-kernels without growing the base kernel-image
> size.
>
> Note this also adds an explicit "depends on MFD_ARIZONA" to all the
> arizona codec Kconfig options. The codec drivers use functions from mfd
> arizona-core. These new depends are necessary to disallow the codec
> drivers being builtin when the arizona-core is build as a module,
> otherwise we end up with missing symbol errors when building vmlinuz.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Thanks,
Charles
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mfd: arizona: Allow building arizona MFD-core as module
@ 2021-05-21 15:09 ` Charles Keepax
0 siblings, 0 replies; 6+ messages in thread
From: Charles Keepax @ 2021-05-21 15:09 UTC (permalink / raw)
To: Hans de Goede
Cc: alsa-devel, patches, Liam Girdwood, linux-kernel, Mark Brown, Lee Jones
On Fri, May 21, 2021 at 03:50:23PM +0200, Hans de Goede wrote:
> There is no reason why the arizona core,irq and codec model specific
> regmap bits cannot be build as a module. All they do is export symbols
> which are used by the arizona-spi/i2c and arizona-codec modules, which
> themselves can be built as module.
>
> Change the Kconfig and Makefile arizona bits so that the arizona MFD-core
> can be built as a module.
>
> This is especially useful on x86 platforms with a WM5102 codec, this
> allows the arizona MFD driver necessary for the WM5102 codec to be
> enabled in generic distro-kernels without growing the base kernel-image
> size.
>
> Note this also adds an explicit "depends on MFD_ARIZONA" to all the
> arizona codec Kconfig options. The codec drivers use functions from mfd
> arizona-core. These new depends are necessary to disallow the codec
> drivers being builtin when the arizona-core is build as a module,
> otherwise we end up with missing symbol errors when building vmlinuz.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Thanks,
Charles
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mfd: arizona: Allow building arizona MFD-core as module
2021-05-21 13:50 ` Hans de Goede
@ 2021-06-01 14:53 ` Lee Jones
-1 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2021-06-01 14:53 UTC (permalink / raw)
To: Hans de Goede
Cc: Liam Girdwood, Mark Brown, linux-kernel, Charles Keepax, patches,
alsa-devel
On Fri, 21 May 2021, Hans de Goede wrote:
> There is no reason why the arizona core,irq and codec model specific
> regmap bits cannot be build as a module. All they do is export symbols
> which are used by the arizona-spi/i2c and arizona-codec modules, which
> themselves can be built as module.
>
> Change the Kconfig and Makefile arizona bits so that the arizona MFD-core
> can be built as a module.
>
> This is especially useful on x86 platforms with a WM5102 codec, this
> allows the arizona MFD driver necessary for the WM5102 codec to be
> enabled in generic distro-kernels without growing the base kernel-image
> size.
>
> Note this also adds an explicit "depends on MFD_ARIZONA" to all the
> arizona codec Kconfig options. The codec drivers use functions from mfd
> arizona-core. These new depends are necessary to disallow the codec
> drivers being builtin when the arizona-core is build as a module,
> otherwise we end up with missing symbol errors when building vmlinuz.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> Changes in v2:
> - Add explicit "depends on MFD_ARIZONA" to all the arizona codec Kconfigs
> ---
> drivers/mfd/Kconfig | 2 +-
> drivers/mfd/Makefile | 14 +++++++-------
> drivers/mfd/arizona-core.c | 2 ++
> sound/soc/codecs/Kconfig | 10 +++++-----
> 4 files changed, 15 insertions(+), 13 deletions(-)
Applied, thanks.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mfd: arizona: Allow building arizona MFD-core as module
@ 2021-06-01 14:53 ` Lee Jones
0 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2021-06-01 14:53 UTC (permalink / raw)
To: Hans de Goede
Cc: alsa-devel, Charles Keepax, patches, Liam Girdwood, linux-kernel,
Mark Brown
On Fri, 21 May 2021, Hans de Goede wrote:
> There is no reason why the arizona core,irq and codec model specific
> regmap bits cannot be build as a module. All they do is export symbols
> which are used by the arizona-spi/i2c and arizona-codec modules, which
> themselves can be built as module.
>
> Change the Kconfig and Makefile arizona bits so that the arizona MFD-core
> can be built as a module.
>
> This is especially useful on x86 platforms with a WM5102 codec, this
> allows the arizona MFD driver necessary for the WM5102 codec to be
> enabled in generic distro-kernels without growing the base kernel-image
> size.
>
> Note this also adds an explicit "depends on MFD_ARIZONA" to all the
> arizona codec Kconfig options. The codec drivers use functions from mfd
> arizona-core. These new depends are necessary to disallow the codec
> drivers being builtin when the arizona-core is build as a module,
> otherwise we end up with missing symbol errors when building vmlinuz.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> Changes in v2:
> - Add explicit "depends on MFD_ARIZONA" to all the arizona codec Kconfigs
> ---
> drivers/mfd/Kconfig | 2 +-
> drivers/mfd/Makefile | 14 +++++++-------
> drivers/mfd/arizona-core.c | 2 ++
> sound/soc/codecs/Kconfig | 10 +++++-----
> 4 files changed, 15 insertions(+), 13 deletions(-)
Applied, thanks.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-06-01 14:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21 13:50 [PATCH] mfd: arizona: Allow building arizona MFD-core as module Hans de Goede
2021-05-21 13:50 ` Hans de Goede
2021-05-21 15:09 ` Charles Keepax
2021-05-21 15:09 ` Charles Keepax
2021-06-01 14:53 ` Lee Jones
2021-06-01 14:53 ` Lee Jones
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.