]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: rt5682: split i2c driver into separate module
authorArnd Bergmann <arnd@arndb.de>
Thu, 28 May 2020 09:17:17 +0000 (11:17 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 28 May 2020 12:20:19 +0000 (13:20 +0100)
commitf6a2e0fc5dc697ce934a7efed5e16f4dc0ac8d2a
tree452aa83f2e7b9f50c838c32466983b2850c01828
parentfd595c3d9317c7d49653ec9210171c843b06db9e
ASoC: rt5682: split i2c driver into separate module

With SND_SOC_AMD_RV_RT5682_MACH using the i2c version of the
driver, we can easily get a build failure when I2C is built-in
but soundwire is not:

 WARNING: unmet direct dependencies detected for SND_SOC_RT5682
   Depends on [m]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && (I2C [=y] || SOUNDWIRE [=m]) && (SOUNDWIRE [=m] || !SOUNDWIRE [=m]) && (I2C [=y] || !I2C [=y])
   Selected by [y]:
   - SND_SOC_AMD_RV_RT5682_MACH [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_AMD_ACP3x [=y] && I2C [=y] && CROS_EC [=y]
   Selected by [m]:
   - SND_SOC_RT5682_SDW [=m] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SOUNDWIRE [=m] && (I2C [=y] || !I2C [=y])

Rework the driver to have three separate modules, with the
main driver just dealing with the common bits and the actual
initialization as part of i2c and sdw specific modules.

The conversion is fairly mechanical to keep it easy to review,
i.e. it moves code around with the minimal required renaming
and changes.

Fixes: 230502f241e1 ("ASoC: amd: Add machine driver for Raven based platform")
Fixes: 71a8ab615ac2 ("ASoC: rt5682: fix I2C/Soundwire dependencies")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200528091851.2889754-1-arnd@arndb.de
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/amd/Kconfig
sound/soc/codecs/Kconfig
sound/soc/codecs/Makefile
sound/soc/codecs/rt5682-i2c.c [new file with mode: 0644]
sound/soc/codecs/rt5682-sdw.c
sound/soc/codecs/rt5682-sdw.h [deleted file]
sound/soc/codecs/rt5682.c
sound/soc/codecs/rt5682.h
sound/soc/intel/boards/Kconfig