* [PATCH 1/3] ASoC: adau1977: make the Kconfig symbols user selectable
2026-09-14 10:12 [PATCH 0/3] ASoC: adau1977: small fixes to make the driver more usable Alvin Šipraga
@ 2026-09-14 10:12 ` Alvin Šipraga
2026-09-14 10:12 ` [PATCH 2/3] ASoC: adau1977-spi: drop __maybe_unused and of_match_ptr() Alvin Šipraga
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Alvin Šipraga @ 2026-09-14 10:12 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Lars-Peter Clausen, Nuno Sá
Cc: linux-sound, linux-kernel, Alvin Šipraga
SND_SOC_ADAU1977_{SPI,I2C} are missing Kconfig text, so they don't show
up in menuconfig and can't be selected by a user - only by another
symbol such as a machine driver. Add the text to make these symbols
selectable and usable with generic machine drivers like the simple audio
card.
Signed-off-by: Alvin Šipraga <alvin.sipraga@analog.com>
---
sound/soc/codecs/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index f9a47e262a77..d88593c2bac8 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -524,13 +524,13 @@ config SND_SOC_ADAU1977
tristate
config SND_SOC_ADAU1977_SPI
- tristate
+ tristate "Analog Devices ADAU1977/ADAU1978/ADAU1979 CODEC - SPI"
depends on SPI_MASTER
select SND_SOC_ADAU1977
select REGMAP_SPI
config SND_SOC_ADAU1977_I2C
- tristate
+ tristate "Analog Devices ADAU1977/ADAU1978/ADAU1979 CODEC - I2C"
depends on I2C
select SND_SOC_ADAU1977
select REGMAP_I2C
--
2.54.0
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 2/3] ASoC: adau1977-spi: drop __maybe_unused and of_match_ptr()
2026-09-14 10:12 [PATCH 0/3] ASoC: adau1977: small fixes to make the driver more usable Alvin Šipraga
2026-09-14 10:12 ` [PATCH 1/3] ASoC: adau1977: make the Kconfig symbols user selectable Alvin Šipraga
@ 2026-09-14 10:12 ` Alvin Šipraga
2026-09-14 12:19 ` Nuno Sá
2026-09-14 10:12 ` [PATCH 3/3] ASoC: adau1977-i2c: add OF match table for I2C Alvin Šipraga
` (2 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Alvin Šipraga @ 2026-09-14 10:12 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Lars-Peter Clausen, Nuno Sá
Cc: linux-sound, linux-kernel, Alvin Šipraga
Since commit 5ab23c7923a1 ("modpost: Create modalias for builtin
modules") MODULE_DEVICE_TABLE() is enough to reference a match table and
the data isn't discarded by the linker even when the driver is built-in
and CONFIG_OF is disabled. Drop the of_match_ptr() wrapping so that OF
matching keeps working regardless of CONFIG_OF. This also means we can
drop __maybe_unused since it's always used.
The entries in adau1977_spi_of_match were also erroneously indented with
spaces - replace the indentation with tabs to conform with coding style.
Signed-off-by: Alvin Šipraga <alvin.sipraga@analog.com>
---
sound/soc/codecs/adau1977-spi.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/codecs/adau1977-spi.c b/sound/soc/codecs/adau1977-spi.c
index 878cde9d1014..c98da5ba9e9e 100644
--- a/sound/soc/codecs/adau1977-spi.c
+++ b/sound/soc/codecs/adau1977-spi.c
@@ -53,18 +53,18 @@ static const struct spi_device_id adau1977_spi_ids[] = {
};
MODULE_DEVICE_TABLE(spi, adau1977_spi_ids);
-static const struct of_device_id adau1977_spi_of_match[] __maybe_unused = {
- { .compatible = "adi,adau1977" },
- { .compatible = "adi,adau1978" },
- { .compatible = "adi,adau1979" },
- { },
+static const struct of_device_id adau1977_spi_of_match[] = {
+ { .compatible = "adi,adau1977" },
+ { .compatible = "adi,adau1978" },
+ { .compatible = "adi,adau1979" },
+ { },
};
MODULE_DEVICE_TABLE(of, adau1977_spi_of_match);
static struct spi_driver adau1977_spi_driver = {
.driver = {
.name = "adau1977",
- .of_match_table = of_match_ptr(adau1977_spi_of_match),
+ .of_match_table = adau1977_spi_of_match,
},
.probe = adau1977_spi_probe,
.id_table = adau1977_spi_ids,
--
2.54.0
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 2/3] ASoC: adau1977-spi: drop __maybe_unused and of_match_ptr()
2026-09-14 10:12 ` [PATCH 2/3] ASoC: adau1977-spi: drop __maybe_unused and of_match_ptr() Alvin Šipraga
@ 2026-09-14 12:19 ` Nuno Sá
0 siblings, 0 replies; 7+ messages in thread
From: Nuno Sá @ 2026-09-14 12:19 UTC (permalink / raw)
To: Alvin Šipraga
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Lars-Peter Clausen, linux-sound, linux-kernel
On Mon, Sep 14, 2026 at 12:12:36PM +0200, Alvin Šipraga wrote:
> Since commit 5ab23c7923a1 ("modpost: Create modalias for builtin
> modules") MODULE_DEVICE_TABLE() is enough to reference a match table and
> the data isn't discarded by the linker even when the driver is built-in
> and CONFIG_OF is disabled. Drop the of_match_ptr() wrapping so that OF
> matching keeps working regardless of CONFIG_OF. This also means we can
> drop __maybe_unused since it's always used.
>
> The entries in adau1977_spi_of_match were also erroneously indented with
> spaces - replace the indentation with tabs to conform with coding style.
>
> Signed-off-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
Small nit:
> sound/soc/codecs/adau1977-spi.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/sound/soc/codecs/adau1977-spi.c b/sound/soc/codecs/adau1977-spi.c
> index 878cde9d1014..c98da5ba9e9e 100644
> --- a/sound/soc/codecs/adau1977-spi.c
> +++ b/sound/soc/codecs/adau1977-spi.c
> @@ -53,18 +53,18 @@ static const struct spi_device_id adau1977_spi_ids[] = {
> };
> MODULE_DEVICE_TABLE(spi, adau1977_spi_ids);
>
> -static const struct of_device_id adau1977_spi_of_match[] __maybe_unused = {
> - { .compatible = "adi,adau1977" },
> - { .compatible = "adi,adau1978" },
> - { .compatible = "adi,adau1979" },
> - { },
> +static const struct of_device_id adau1977_spi_of_match[] = {
> + { .compatible = "adi,adau1977" },
> + { .compatible = "adi,adau1978" },
> + { .compatible = "adi,adau1979" },
> + { },
While at it, you cloud drop the comma. We have the null terminator after
all. Also applies on patch 3
- Nuno Sá
> };
> MODULE_DEVICE_TABLE(of, adau1977_spi_of_match);
>
> static struct spi_driver adau1977_spi_driver = {
> .driver = {
> .name = "adau1977",
> - .of_match_table = of_match_ptr(adau1977_spi_of_match),
> + .of_match_table = adau1977_spi_of_match,
> },
> .probe = adau1977_spi_probe,
> .id_table = adau1977_spi_ids,
>
> --
> 2.54.0
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/3] ASoC: adau1977-i2c: add OF match table for I2C
2026-09-14 10:12 [PATCH 0/3] ASoC: adau1977: small fixes to make the driver more usable Alvin Šipraga
2026-09-14 10:12 ` [PATCH 1/3] ASoC: adau1977: make the Kconfig symbols user selectable Alvin Šipraga
2026-09-14 10:12 ` [PATCH 2/3] ASoC: adau1977-spi: drop __maybe_unused and of_match_ptr() Alvin Šipraga
@ 2026-09-14 10:12 ` Alvin Šipraga
2026-09-14 12:20 ` [PATCH 0/3] ASoC: adau1977: small fixes to make the driver more usable Nuno Sá
2026-09-14 14:20 ` Mark Brown
4 siblings, 0 replies; 7+ messages in thread
From: Alvin Šipraga @ 2026-09-14 10:12 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Lars-Peter Clausen, Nuno Sá
Cc: linux-sound, linux-kernel, Alvin Šipraga
Like for SPI, the I2C driver needs an OF match table for the kernel to
be able to automatically load the driver when built as a module. Add
one.
Signed-off-by: Alvin Šipraga <alvin.sipraga@analog.com>
---
sound/soc/codecs/adau1977-i2c.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sound/soc/codecs/adau1977-i2c.c b/sound/soc/codecs/adau1977-i2c.c
index d1c6c4ddf506..5a11cafdff36 100644
--- a/sound/soc/codecs/adau1977-i2c.c
+++ b/sound/soc/codecs/adau1977-i2c.c
@@ -34,9 +34,18 @@ static const struct i2c_device_id adau1977_i2c_ids[] = {
};
MODULE_DEVICE_TABLE(i2c, adau1977_i2c_ids);
+static const struct of_device_id adau1977_i2c_of_match[] = {
+ { .compatible = "adi,adau1977" },
+ { .compatible = "adi,adau1978" },
+ { .compatible = "adi,adau1979" },
+ { },
+};
+MODULE_DEVICE_TABLE(of, adau1977_i2c_of_match);
+
static struct i2c_driver adau1977_i2c_driver = {
.driver = {
.name = "adau1977",
+ .of_match_table = adau1977_i2c_of_match,
},
.probe = adau1977_i2c_probe,
.id_table = adau1977_i2c_ids,
--
2.54.0
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 0/3] ASoC: adau1977: small fixes to make the driver more usable
2026-09-14 10:12 [PATCH 0/3] ASoC: adau1977: small fixes to make the driver more usable Alvin Šipraga
` (2 preceding siblings ...)
2026-09-14 10:12 ` [PATCH 3/3] ASoC: adau1977-i2c: add OF match table for I2C Alvin Šipraga
@ 2026-09-14 12:20 ` Nuno Sá
2026-09-14 14:20 ` Mark Brown
4 siblings, 0 replies; 7+ messages in thread
From: Nuno Sá @ 2026-09-14 12:20 UTC (permalink / raw)
To: Alvin Šipraga
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Lars-Peter Clausen, linux-sound, linux-kernel
On Mon, Sep 14, 2026 at 12:12:34PM +0200, Alvin Šipraga wrote:
> Here's a few fixes I encountered were needed in order to use this driver
> as a module together with the simple audio card.
>
> Signed-off-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
> Alvin Šipraga (3):
> ASoC: adau1977: make the Kconfig symbols user selectable
> ASoC: adau1977-spi: drop __maybe_unused and of_match_ptr()
> ASoC: adau1977-i2c: add OF match table for I2C
>
> sound/soc/codecs/Kconfig | 4 ++--
> sound/soc/codecs/adau1977-i2c.c | 9 +++++++++
> sound/soc/codecs/adau1977-spi.c | 12 ++++++------
> 3 files changed, 17 insertions(+), 8 deletions(-)
> ---
Small nit from me but nevertheless:
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
> base-commit: 7e125889f1705fc6326679a3db3b4159f7a8c87e
> change-id: 20260914-asoc-adau1977-fixes-86cde36468a6
>
> Best regards,
> --
> Alvin Šipraga <alvin.sipraga@analog.com>
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 0/3] ASoC: adau1977: small fixes to make the driver more usable
2026-09-14 10:12 [PATCH 0/3] ASoC: adau1977: small fixes to make the driver more usable Alvin Šipraga
` (3 preceding siblings ...)
2026-09-14 12:20 ` [PATCH 0/3] ASoC: adau1977: small fixes to make the driver more usable Nuno Sá
@ 2026-09-14 14:20 ` Mark Brown
4 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2026-09-14 14:20 UTC (permalink / raw)
To: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Lars-Peter Clausen,
Nuno Sá,
Alvin Šipraga
Cc: linux-sound, linux-kernel
On Mon, 14 Sep 2026 12:12:34 +0200, Alvin Šipraga wrote:
> ASoC: adau1977: small fixes to make the driver more usable
>
> Here's a few fixes I encountered were needed in order to use this driver
> as a module together with the simple audio card.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.3
Thanks!
[1/3] ASoC: adau1977: make the Kconfig symbols user selectable
https://git.kernel.org/broonie/sound/c/b205b45c67c4
[2/3] ASoC: adau1977-spi: drop __maybe_unused and of_match_ptr()
https://git.kernel.org/broonie/sound/c/a6e83c65cbd5
[3/3] ASoC: adau1977-i2c: add OF match table for I2C
https://git.kernel.org/broonie/sound/c/642759979afc
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 7+ messages in thread