On Tue, Oct 06, 2009 at 07:32:30AM -0400, Mike Frysinger wrote:
back to the original issue. the AD1836/AD1938 have their registers programed via SPI, but they dont care what SPI bus they're connected to. that is specified in the board resources. because of the way the Kconfig options are handled (machine drivers select codecs), the SPI_MASTER dependency cannot be added to the codec Kconfigs in codecs/Kconfig. so even though the SPI dependency is only in the codec and not the machine driver, the machine driver needs to declare the SPI_MASTER dependency to prevent incorrect config selections and link failures.
Or, like I say, the drivers for the CODEC should be changed to allow build with no control bus. This is a general problem for all the ASoC drivers and I'm still not sure which way to go. Depending on just SPI support fixes the random build case but doesn't help end users get the driver working so it doesn't seem so useful. If we're only going to be able to fix the random build case then it seems more useful to do so by having the CODEC driver able to build without the control bus, that way individual machine drivers don't need to worry about it.