mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
* [PATCH 0/4] ASoC: meson: fix missing REGMAP_MMIO dependencies
@ 2026-11-07 16:55 Jude Gyimah
  2026-11-07 16:55 ` [PATCH 1/4] ASoC: meson: aiu: select REGMAP_MMIO Jude Gyimah
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jude Gyimah @ 2026-11-07 16:55 UTC (permalink / raw)
  To: jbrunet, lgirdwood, broonie, perex, tiwai
  Cc: neil.armstrong, khilman, martin.blumenstingl, linux-sound,
	linux-amlogic, linux-arm-kernel, linux-kernel, Jude Gyimah

Each of these drivers can be built into vmlinux while the code
providing a symbol it calls is a module, which fails to link.  The
same shape in 4 drivers, so they are here as one series.

Affected: aiu, axg-pdm, axg-spdifin, axg-spdifout.

The fix is a select rather than a depends on: the providers have no
prompt of their own and are only ever enabled by a select, so a
depends on would leave these drivers unselectable.

Each was reproduced on v7.3, arm64 by a vmlinux link that failed on the
named symbol, and each links once the select is added.

Found with kreach, a static check that compares what Kconfig allows
against the symbols the compiled objects actually reference.

The checker is at https://github.com/JGyimah/kreach, and the
reproducer configuration for each finding is published with it
under results/.

Jude Gyimah (4):
  ASoC: meson: aiu: select REGMAP_MMIO
  ASoC: meson: axg-pdm: select REGMAP_MMIO
  ASoC: meson: axg-spdifin: select REGMAP_MMIO
  ASoC: meson: axg-spdifout: select REGMAP_MMIO

 sound/soc/meson/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)

-- 
2.43.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/4] ASoC: meson: aiu: select REGMAP_MMIO
  2026-11-07 16:55 [PATCH 0/4] ASoC: meson: fix missing REGMAP_MMIO dependencies Jude Gyimah
@ 2026-11-07 16:55 ` Jude Gyimah
  2026-11-07 16:55 ` [PATCH 2/4] ASoC: meson: axg-pdm: " Jude Gyimah
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Jude Gyimah @ 2026-11-07 16:55 UTC (permalink / raw)
  To: jbrunet, lgirdwood, broonie, perex, tiwai
  Cc: neil.armstrong, khilman, martin.blumenstingl, linux-sound,
	linux-amlogic, linux-arm-kernel, linux-kernel, Jude Gyimah

gx-formatter.o is part of snd-soc-meson-aiu:

  sound/soc/meson/Makefile:7: snd-soc-meson-aiu-y += gx-formatter.o

so SND_MESON_AIU is the option that decides where its call lands,
and the error below names gx-formatter.c rather than aiu.c.

aiu calls __devm_regmap_init_mmio_clk, which
drivers/base/regmap/regmap-mmio.c provides under REGMAP_MMIO.

  gx-formatter.c:(.text+0x74): undefined reference to
    `__devm_regmap_init_mmio_clk'

The driver can be built into vmlinux while REGMAP_MMIO is a module, in
which case the symbol is not there at link time.

Select rather than depend on: REGMAP_MMIO has no prompt of its own and is
only ever enabled by a select, so a depends on would leave SND_MESON_AIU
unselectable.

Reproduced on v7.3, arm64, with CONFIG_SND_MESON_AIU=y and
CONFIG_REGMAP_MMIO=m.

Found with kreach, a static check that compares what Kconfig allows
against the symbols the compiled objects actually reference.

Fixes: 6ae9ca9ce986 ("ASoC: meson: aiu: add i2s and spdif support")
Signed-off-by: Jude Gyimah <jude.gyimah87@gmail.com>
---
 sound/soc/meson/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/meson/Kconfig b/sound/soc/meson/Kconfig
index d9a730994a2a..d0f60f8af2b5 100644
--- a/sound/soc/meson/Kconfig
+++ b/sound/soc/meson/Kconfig
@@ -4,6 +4,7 @@ menu "Amlogic"
 
 config SND_MESON_AIU
 	tristate "Amlogic AIU"
+	select REGMAP_MMIO
 	select SND_MESON_CODEC_GLUE
 	select SND_PCM_IEC958
 	imply SND_SOC_MESON_T9015
-- 
2.43.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/4] ASoC: meson: axg-pdm: select REGMAP_MMIO
  2026-11-07 16:55 [PATCH 0/4] ASoC: meson: fix missing REGMAP_MMIO dependencies Jude Gyimah
  2026-11-07 16:55 ` [PATCH 1/4] ASoC: meson: aiu: select REGMAP_MMIO Jude Gyimah
@ 2026-11-07 16:55 ` Jude Gyimah
  2026-11-07 17:02   ` sashiko-bot
  2026-11-07 16:55 ` [PATCH 3/4] ASoC: meson: axg-spdifin: " Jude Gyimah
  2026-11-07 16:55 ` [PATCH 4/4] ASoC: meson: axg-spdifout: " Jude Gyimah
  3 siblings, 1 reply; 7+ messages in thread
From: Jude Gyimah @ 2026-11-07 16:55 UTC (permalink / raw)
  To: jbrunet, lgirdwood, broonie, perex, tiwai
  Cc: neil.armstrong, khilman, martin.blumenstingl, linux-sound,
	linux-amlogic, linux-arm-kernel, linux-kernel, Jude Gyimah

Several stanzas in the same file already select REGMAP_MMIO,
SND_MESON_G12A_TOACODEC among them.  These three do not.

axg-pdm calls __devm_regmap_init_mmio_clk, which
drivers/base/regmap/regmap-mmio.c provides under REGMAP_MMIO.

  axg-pdm.c:(.text+0xc4): undefined reference to
    `__devm_regmap_init_mmio_clk'

The driver can be built into vmlinux while REGMAP_MMIO is a module, in
which case the symbol is not there at link time.

Select rather than depend on: REGMAP_MMIO has no prompt of its own and is
only ever enabled by a select, so a depends on would leave
SND_MESON_AXG_PDM unselectable.

Reproduced on v7.3, arm64, with CONFIG_SND_MESON_AXG_PDM=y and
CONFIG_REGMAP_MMIO=m.

Found with kreach, a static check that compares what Kconfig allows
against the symbols the compiled objects actually reference.

Fixes: 2cfc123eea74 ("ASoC: meson: add axg pdm input")
Signed-off-by: Jude Gyimah <jude.gyimah87@gmail.com>
---
 sound/soc/meson/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/meson/Kconfig b/sound/soc/meson/Kconfig
index d0f60f8af2b5..4b06a9e7c72a 100644
--- a/sound/soc/meson/Kconfig
+++ b/sound/soc/meson/Kconfig
@@ -92,6 +92,7 @@ config SND_MESON_AXG_SPDIFIN
 
 config SND_MESON_AXG_PDM
 	tristate "Amlogic AXG PDM Input Support"
+	select REGMAP_MMIO
 	imply SND_SOC_DMIC
 	imply COMMON_CLK_AXG_AUDIO
 	help
-- 
2.43.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 3/4] ASoC: meson: axg-spdifin: select REGMAP_MMIO
  2026-11-07 16:55 [PATCH 0/4] ASoC: meson: fix missing REGMAP_MMIO dependencies Jude Gyimah
  2026-11-07 16:55 ` [PATCH 1/4] ASoC: meson: aiu: select REGMAP_MMIO Jude Gyimah
  2026-11-07 16:55 ` [PATCH 2/4] ASoC: meson: axg-pdm: " Jude Gyimah
@ 2026-11-07 16:55 ` Jude Gyimah
  2026-11-07 16:55 ` [PATCH 4/4] ASoC: meson: axg-spdifout: " Jude Gyimah
  3 siblings, 0 replies; 7+ messages in thread
From: Jude Gyimah @ 2026-11-07 16:55 UTC (permalink / raw)
  To: jbrunet, lgirdwood, broonie, perex, tiwai
  Cc: neil.armstrong, khilman, martin.blumenstingl, linux-sound,
	linux-amlogic, linux-arm-kernel, linux-kernel, Jude Gyimah

axg-spdifin calls __devm_regmap_init_mmio_clk, which
drivers/base/regmap/regmap-mmio.c provides under REGMAP_MMIO.

  axg-spdifin.c:(.text+0x154): undefined reference to
    `__devm_regmap_init_mmio_clk'

The driver can be built into vmlinux while REGMAP_MMIO is a module, in
which case the symbol is not there at link time.

Select rather than depend on: REGMAP_MMIO has no prompt of its own and is
only ever enabled by a select, so a depends on would leave
SND_MESON_AXG_SPDIFIN unselectable.

Reproduced on v7.3, arm64, with CONFIG_SND_MESON_AXG_SPDIFIN=y and
CONFIG_REGMAP_MMIO=m.

Found with kreach, a static check that compares what Kconfig allows
against the symbols the compiled objects actually reference.

Fixes: 5ce5658375e6 ("ASoC: meson: add axg spdif input")
Signed-off-by: Jude Gyimah <jude.gyimah87@gmail.com>
---
 sound/soc/meson/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/meson/Kconfig b/sound/soc/meson/Kconfig
index 4b06a9e7c72a..10c7d59a5ad1 100644
--- a/sound/soc/meson/Kconfig
+++ b/sound/soc/meson/Kconfig
@@ -85,6 +85,7 @@ config SND_MESON_AXG_SPDIFOUT
 
 config SND_MESON_AXG_SPDIFIN
 	tristate "Amlogic AXG SPDIF Input Support"
+	select REGMAP_MMIO
 	imply SND_SOC_SPDIF
 	help
 	  Select Y or M to add support for SPDIF input embedded
-- 
2.43.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 4/4] ASoC: meson: axg-spdifout: select REGMAP_MMIO
  2026-11-07 16:55 [PATCH 0/4] ASoC: meson: fix missing REGMAP_MMIO dependencies Jude Gyimah
                   ` (2 preceding siblings ...)
  2026-11-07 16:55 ` [PATCH 3/4] ASoC: meson: axg-spdifin: " Jude Gyimah
@ 2026-11-07 16:55 ` Jude Gyimah
  3 siblings, 0 replies; 7+ messages in thread
From: Jude Gyimah @ 2026-11-07 16:55 UTC (permalink / raw)
  To: jbrunet, lgirdwood, broonie, perex, tiwai
  Cc: neil.armstrong, khilman, martin.blumenstingl, linux-sound,
	linux-amlogic, linux-arm-kernel, linux-kernel, Jude Gyimah

axg-spdifout calls __devm_regmap_init_mmio_clk, which
drivers/base/regmap/regmap-mmio.c provides under REGMAP_MMIO.

  axg-spdifout.c:(.text+0x9c): undefined reference to
    `__devm_regmap_init_mmio_clk'

The driver can be built into vmlinux while REGMAP_MMIO is a module, in
which case the symbol is not there at link time.

Select rather than depend on: REGMAP_MMIO has no prompt of its own and is
only ever enabled by a select, so a depends on would leave
SND_MESON_AXG_SPDIFOUT unselectable.

Reproduced on v7.3, arm64, with CONFIG_SND_MESON_AXG_SPDIFOUT=y and
CONFIG_REGMAP_MMIO=m.

Found with kreach, a static check that compares what Kconfig allows
against the symbols the compiled objects actually reference.

Fixes: 53eb4b7aaa04 ("ASoC: meson: add axg spdif output")
Signed-off-by: Jude Gyimah <jude.gyimah87@gmail.com>
---
 sound/soc/meson/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/meson/Kconfig b/sound/soc/meson/Kconfig
index 10c7d59a5ad1..272639dd8eaf 100644
--- a/sound/soc/meson/Kconfig
+++ b/sound/soc/meson/Kconfig
@@ -76,6 +76,7 @@ config SND_MESON_AXG_SOUND_CARD
 
 config SND_MESON_AXG_SPDIFOUT
 	tristate "Amlogic AXG SPDIF Output Support"
+	select REGMAP_MMIO
 	select SND_PCM_IEC958
 	imply SND_SOC_SPDIF
 	imply COMMON_CLK_AXG_AUDIO
-- 
2.43.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/4] ASoC: meson: axg-pdm: select REGMAP_MMIO
  2026-11-07 16:55 ` [PATCH 2/4] ASoC: meson: axg-pdm: " Jude Gyimah
@ 2026-11-07 17:02   ` sashiko-bot
  2026-11-07 17:43     ` Jude Gyimah
  0 siblings, 1 reply; 7+ messages in thread
From: sashiko-bot @ 2026-11-07 17:02 UTC (permalink / raw)
  To: Jude Gyimah; +Cc: linux-sound, linux-amlogic, neil.armstrong

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] ASoC: meson: axg-pdm: commit message refers to three stanzas but
  only updates one
--

commit 1aa97aa37f974c96150326ff4ae32f1b755fbad0
Author: Jude Gyimah <jude.gyimah87@gmail.com>

ASoC: meson: axg-pdm: select REGMAP_MMIO

This commit adds a select REGMAP_MMIO statement to the SND_MESON_AXG_PDM
Kconfig entry to prevent link failures when SND_MESON_AXG_PDM is built-in
and REGMAP_MMIO is built as a module.

> Several stanzas in the same file already select REGMAP_MMIO,
> SND_MESON_G12A_TOACODEC among them.  These three do not.

[Severity: Low]
What does "These three" refer to here?  Nothing earlier in the commit
message names three stanzas, and this patch only updates SND_MESON_AXG_PDM
while the other stanzas are updated in separate commits.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261107165527.576383-1-jude.gyimah87@gmail.com?part=2

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/4] ASoC: meson: axg-pdm: select REGMAP_MMIO
  2026-11-07 17:02   ` sashiko-bot
@ 2026-11-07 17:43     ` Jude Gyimah
  0 siblings, 0 replies; 7+ messages in thread
From: Jude Gyimah @ 2026-11-07 17:43 UTC (permalink / raw)
  To: sashiko-bot, jbrunet, neil.armstrong
  Cc: lgirdwood, broonie, perex, tiwai, khilman, martin.blumenstingl,
	linux-sound, linux-amlogic, linux-arm-kernel, linux-kernel

> What does "These three" refer to here?  Nothing earlier in the commit
> message names three stanzas, and this patch only updates
> SND_MESON_AXG_PDM while the other stanzas are updated in separate
> commits.

Correct, thanks.

The sentence is left over from an earlier three-patch version of this
series, where "these three" meant axg-pdm, axg-spdifin and axg-spdifout.
Its referent only ever lived in the cover letter, which git am drops, so
the commit message never stood on its own -- and the count is wrong now
as well, since the series became four patches when aiu was added.

It should read:

  Several stanzas in the same file already select REGMAP_MMIO,
  SND_MESON_G12A_TOACODEC among them.  SND_MESON_AXG_PDM does not.

That is accurate at v7.3: SND_MESON_AXG_FIFO,
SND_MESON_AXG_TDM_FORMATTER, SND_MESON_G12A_TOACODEC,
SND_MESON_G12A_TOHDMITX and SND_SOC_MESON_T9015 all select REGMAP_MMIO
already.

Only the commit message is affected; the one-line Kconfig change and the
other three patches are unchanged.  I would rather not respin for this
alone, so I will fix it in v2 -- please let me know if there is anything
else to roll in.

Thanks,
Jude

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-07 17:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-07 16:55 [PATCH 0/4] ASoC: meson: fix missing REGMAP_MMIO dependencies Jude Gyimah
2026-11-07 16:55 ` [PATCH 1/4] ASoC: meson: aiu: select REGMAP_MMIO Jude Gyimah
2026-11-07 16:55 ` [PATCH 2/4] ASoC: meson: axg-pdm: " Jude Gyimah
2026-11-07 17:02   ` sashiko-bot
2026-11-07 17:43     ` Jude Gyimah
2026-11-07 16:55 ` [PATCH 3/4] ASoC: meson: axg-spdifin: " Jude Gyimah
2026-11-07 16:55 ` [PATCH 4/4] ASoC: meson: axg-spdifout: " Jude Gyimah

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®