ASoC: ad193x: Split SPI and I2C code into different modules
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 17 Feb 2014 12:16:54 +0000 (13:16 +0100)
committerMark Brown <broonie@linaro.org>
Tue, 18 Feb 2014 01:04:37 +0000 (10:04 +0900)
commit6c3d713e6d32706999689e379a9098afb4cd8a2c
tree7f26da80df69fbd48f53835924be036f161f63f3
parent38dbfb59d1175ef458d006556061adeaa8751b72
ASoC: ad193x: Split SPI and I2C code into different modules

There are a few known (minor) problems with having the support code for both I2C
and SPI in the same module:
    * We need to be extra careful to make sure to not build the driver into the
      kernel if one of the subsystems is build as a module (Currently only I2C
      can be build as a module).
    * The module init path error handling is rather ugly. E.g. what should be
      done if either the SPI or the I2C driver fails to register? Most drivers
      that implement SPI and I2C in the same module currently fallback to
      undefined behavior in that case. Splitting the the driver into two
      modules, one for each bus, allows the registration of the other bus driver
      to continue without problems if one of them fails.

This patch splits the AD193X driver into 3 modules. One core module that
implements the device logic, but is independent of the bus method used. And one
module for SPI and I2C each that registers the drivers and sets up the regmap
struct for the bus.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/blackfin/Kconfig
sound/soc/codecs/Kconfig
sound/soc/codecs/Makefile
sound/soc/codecs/ad193x-i2c.c [new file with mode: 0644]
sound/soc/codecs/ad193x-spi.c [new file with mode: 0644]
sound/soc/codecs/ad193x.c
sound/soc/codecs/ad193x.h
This page took 0.027183 seconds and 5 git commands to generate.