linux/sound/soc/amd
Arnd Bergmann a50067d4f3
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: 6b8e4e7db3 ("ASoC: amd: Add machine driver for Raven based platform")
Fixes: fd443a20c2 ("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>
2020-05-28 13:20:19 +01:00
..
include ASoC: AMD : add ACP 2.2 register headers 2016-01-10 12:44:10 +00:00
raven ASoC: amd: raven: Make the driver name consistent across files 2020-05-18 16:43:43 +01:00
renoir ASoC: amd: return error when acp de-init fails 2020-05-19 19:49:55 +01:00
acp3x-rt5682-max9836.c ASoC: amd: Fix button configuration 2020-04-14 12:59:13 +01:00
acp-da7219-max98357a.c ASoC: amd: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer 2020-03-27 14:44:30 +00:00
acp-pcm-dma.c ASoC: amd: Drop superfluous ioctl PCM ops 2019-12-11 15:55:28 +00:00
acp-rt5645.c ASoC: amd: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer 2020-03-27 14:44:30 +00:00
acp.h ASoC: use DMA addr rather than CPU pa for acp_audio_dma 2018-12-06 12:53:04 +00:00
Kconfig ASoC: rt5682: split i2c driver into separate module 2020-05-28 13:20:19 +01:00
Makefile ASoC: amd: enable Renoir acp3x drivers build 2020-05-19 13:45:34 +01:00