From: Arnd Bergmann <arnd@kernel.org>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
Oder Chiou <oder_chiou@realtek.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Richard Fitzgerald <rf@opensource.cirrus.com>,
Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ASoC: rt5575: fix SPI dependency
Date: Mon, 2 Feb 2026 10:54:12 +0100 [thread overview]
Message-ID: <20260202095432.1234133-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
The rt5575 driver fails to link when SPI support is in a loadable
module but the codec is built-in:
x86_64-linux-ld: vmlinux.o: in function `rt5575_i2c_probe':
rt5575.c:(.text+0x9792ce): undefined reference to `rt5575_spi_get_device'
rt5575.c:(.text+0x979332): undefined reference to `rt5575_spi_fw_load'
Change the symbol in to a 'bool' and add a dependency that rules
out the broken configuration.
Fixes: 420739112e95 ("ASoC: rt5575: Add the codec driver for the ALC5575")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
Alternatively, the main driver could 'depends on SPI_MASTER || !SPI_MASTER',
with the RT5575_SPI support becoming a hidden symbol.
---
sound/soc/codecs/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index f34d7b510c91..e78ac302da15 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -1801,9 +1801,10 @@ config SND_SOC_RT5575
depends on I2C
config SND_SOC_RT5575_SPI
- tristate "Realtek ALC5575 Codec - SPI"
+ bool "Realtek ALC5575 Codec - SPI"
depends on SPI_MASTER && I2C
depends on SND_SOC_RT5575
+ depends on SPI_MASTER=y || SND_SOC_RT5575=m
config SND_SOC_RT5616
tristate "Realtek RT5616 CODEC"
--
2.39.5
next reply other threads:[~2026-02-02 9:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-02 9:54 Arnd Bergmann [this message]
2026-02-02 22:48 ` [PATCH] ASoC: rt5575: fix SPI dependency Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260202095432.1234133-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=oder_chiou@realtek.com \
--cc=perex@perex.cz \
--cc=rf@opensource.cirrus.com \
--cc=srinivas.kandagatla@oss.qualcomm.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox