diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-01-03 05:24:41 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-01-06 09:23:10 -0500 |
commit | 227b4dc6432d271eecd0ff0aefe6f0897ec47397 (patch) | |
tree | 464777efda9c28c3689f6e8a7cd5862f5a7a3da7 /sound/soc/codecs/Kconfig | |
parent | 8c0bad7fa5be47aa8a3d03ff6ee1917fa68b72e3 (diff) |
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: Ingo Molnar <mingo@elte.hu>
Tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/Kconfig')
-rw-r--r-- | sound/soc/codecs/Kconfig | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index c41289b5f586..d0e0d691ae51 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig | |||
@@ -1,3 +1,13 @@ | |||
1 | # Helper to resolve issues with configs that have SPI enabled but I2C | ||
2 | # modular, meaning we can't build the codec driver in with I2C support. | ||
3 | # We use an ordered list of conditional defaults to pick the appropriate | ||
4 | # setting - SPI can't be modular so that case doesn't need to be covered. | ||
5 | config SND_SOC_I2C_AND_SPI | ||
6 | tristate | ||
7 | default m if I2C=m | ||
8 | default y if I2C=y | ||
9 | default y if SPI_MASTER=y | ||
10 | |||
1 | config SND_SOC_ALL_CODECS | 11 | config SND_SOC_ALL_CODECS |
2 | tristate "Build all ASoC CODEC drivers" | 12 | tristate "Build all ASoC CODEC drivers" |
3 | select SND_SOC_AC97_CODEC if SND_SOC_AC97_BUS | 13 | select SND_SOC_AC97_CODEC if SND_SOC_AC97_BUS |
@@ -14,12 +24,12 @@ config SND_SOC_ALL_CODECS | |||
14 | select SND_SOC_UDA134X | 24 | select SND_SOC_UDA134X |
15 | select SND_SOC_UDA1380 if I2C | 25 | select SND_SOC_UDA1380 if I2C |
16 | select SND_SOC_WM8350 if MFD_WM8350 | 26 | select SND_SOC_WM8350 if MFD_WM8350 |
17 | select SND_SOC_WM8510 if (I2C || SPI_MASTER) | 27 | select SND_SOC_WM8510 if SND_SOC_I2C_AND_SPI |
18 | select SND_SOC_WM8580 if I2C | 28 | select SND_SOC_WM8580 if I2C |
19 | select SND_SOC_WM8728 if (I2C || SPI_MASTER) | 29 | select SND_SOC_WM8728 if SND_SOC_I2C_AND_SPI |
20 | select SND_SOC_WM8731 if (I2C || SPI_MASTER) | 30 | select SND_SOC_WM8731 if SND_SOC_I2C_AND_SPI |
21 | select SND_SOC_WM8750 if (I2C || SPI_MASTER) | 31 | select SND_SOC_WM8750 if SND_SOC_I2C_AND_SPI |
22 | select SND_SOC_WM8753 if (I2C || SPI_MASTER) | 32 | select SND_SOC_WM8753 if SND_SOC_I2C_AND_SPI |
23 | select SND_SOC_WM8900 if I2C | 33 | select SND_SOC_WM8900 if I2C |
24 | select SND_SOC_WM8903 if I2C | 34 | select SND_SOC_WM8903 if I2C |
25 | select SND_SOC_WM8971 if I2C | 35 | select SND_SOC_WM8971 if I2C |