ASoC: fix initialization order of the CS4270 codec driver
ASoC codec drivers typically serve two masters: the I2C bus and ASoC itself.
When a codec driver registers with ASoC, a probe function is called. Most
codec drivers call ASoC first, and then register with the I2C bus in the ASoC
probe function.
However, in order to support multiple codecs on one board, it's easier if the
codec driver is probed via the I2C bus first. This is because the call to
i2c_add_driver() can result in the I2C probe function being called multiple
times - once for each codec. In the current design, the driver registers
once with ASoC, and in the ASoC probe function, it calls i2c_add_driver().
The results in the I2C probe function being called multiple times before the
driver can register with ASoC again.
The new design has the driver call i2c_add_driver() first. In the I2C probe
function, the driver registers with ASoC. This allows the ASoC probe function
to be called once per I2C device.
Also add code to check if the I2C probe function is called more than once,
since that is not supported with the current ASoC design.
Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>