Commit 227b4dc6 authored by Mark Brown's avatar Mark Brown

ASoC: Fix SND_SOC_ALL_CODECS handling of dual SPI and I2C control buses

For codecs that have both SPI and I2C support we need to ensure that we
don't try to make the codec driver built in when I2C is modular since
that won't link.  Do this by creating a helper variable which uses
conditional defaults to pick up the correct value for all combinations.

We don't need to do anything special for I2C-only codecs since a
conditional select passes on the full value for a tristate.
Reported-by: default avatarIngo Molnar <mingo@elte.hu>
Tested-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 8c0bad7f
# Helper to resolve issues with configs that have SPI enabled but I2C
# modular, meaning we can't build the codec driver in with I2C support.
# We use an ordered list of conditional defaults to pick the appropriate
# setting - SPI can't be modular so that case doesn't need to be covered.
config SND_SOC_I2C_AND_SPI
tristate
default m if I2C=m
default y if I2C=y
default y if SPI_MASTER=y
config SND_SOC_ALL_CODECS config SND_SOC_ALL_CODECS
tristate "Build all ASoC CODEC drivers" tristate "Build all ASoC CODEC drivers"
select SND_SOC_AC97_CODEC if SND_SOC_AC97_BUS select SND_SOC_AC97_CODEC if SND_SOC_AC97_BUS
...@@ -14,12 +24,12 @@ config SND_SOC_ALL_CODECS ...@@ -14,12 +24,12 @@ config SND_SOC_ALL_CODECS
select SND_SOC_UDA134X select SND_SOC_UDA134X
select SND_SOC_UDA1380 if I2C select SND_SOC_UDA1380 if I2C
select SND_SOC_WM8350 if MFD_WM8350 select SND_SOC_WM8350 if MFD_WM8350
select SND_SOC_WM8510 if (I2C || SPI_MASTER) select SND_SOC_WM8510 if SND_SOC_I2C_AND_SPI
select SND_SOC_WM8580 if I2C select SND_SOC_WM8580 if I2C
select SND_SOC_WM8728 if (I2C || SPI_MASTER) select SND_SOC_WM8728 if SND_SOC_I2C_AND_SPI
select SND_SOC_WM8731 if (I2C || SPI_MASTER) select SND_SOC_WM8731 if SND_SOC_I2C_AND_SPI
select SND_SOC_WM8750 if (I2C || SPI_MASTER) select SND_SOC_WM8750 if SND_SOC_I2C_AND_SPI
select SND_SOC_WM8753 if (I2C || SPI_MASTER) select SND_SOC_WM8753 if SND_SOC_I2C_AND_SPI
select SND_SOC_WM8900 if I2C select SND_SOC_WM8900 if I2C
select SND_SOC_WM8903 if I2C select SND_SOC_WM8903 if I2C
select SND_SOC_WM8971 if I2C select SND_SOC_WM8971 if I2C
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment