
The sound subsystem has never been converted to driver model. It is not widely used and is a little bit complicating since it needs an audio codec, an i2s device and a sound device to bring them together.
Sound is the main subsystem holding back removal of CONFIG_DM_I2C_COMPAT.
This series takes a stab at doing the conversion. So far this is only tested on snow. I intend to test also on spring and pit/pi when I can. I do not have smdk5250/5420 or arndale to test with.
Simon Glass (30): sandbox: Increase the pre-relocation memory snow: Expand U-Boot size dm: sound: samsung: Make local function static dm: sound: Rename en_sound_codec to sound_codec dm: sound: Drop unused pre-device-tree code dm: sound: samsung: Rename i2stx_info to samsung_i2s_priv dm: sound: Drop codec_type dm: sound: wm8994: Pass private data to internal functions dm: sound: max98095: Pass private data to internal functions dm: sound: wm8994: Create a new common init function dm: sound: wm899c: Split out interface setup code dm: sound: max98095: Split out interface setup code dm: sound: wm8994: Drop global i2c-address variable dm: sound: max98095: Drop global i2c-address variable dm: sound: wm8994: Drop g_codec_info and g_wm8994_info dm: sound: max98095: Drop g_codec_info and g_max98095_info dm: sound: wm8994: Drop wm8994_i2c_init() dm: sound: Fix up header ordering dm: sound: exynos: Correct codec bus address dm: sound: Create an option to use driver model for sound dm: sound: Rename samsung_i2s_priv to i2s_uc_priv dm: sound: Create a uclass for audio codecs dm: sound: Create a uclass for i2s dm: sound: Create a uclass for sound dm: core: Add a function to read into a unsigned int dm: sound: Start i2c IDs from 0 dm: sound: Add conversion to driver model dm: exynos: sound: Convert to use driver model dm: exynos: Drop CONFIG_DM_I2C_COMPAT dm: sound: Complete migration to driver model
Kconfig | 2 + arch/arm/dts/exynos5250-smdk5250.dts | 21 +- arch/arm/dts/exynos5250-snow.dts | 25 +- arch/arm/dts/exynos5250-spring.dts | 24 +- arch/arm/dts/exynos5250.dtsi | 15 +- arch/arm/dts/exynos5420-peach-pit.dts | 24 +- arch/arm/dts/exynos5420-smdk5420.dts | 21 +- arch/arm/dts/exynos54xx.dtsi | 7 + arch/sandbox/dts/test.dts | 23 ++ arch/sandbox/include/asm/test.h | 40 +++ cmd/sound.c | 13 +- configs/arndale_defconfig | 1 + configs/peach-pi_defconfig | 2 +- configs/peach-pit_defconfig | 2 +- configs/sandbox64_defconfig | 1 - configs/sandbox_defconfig | 2 +- configs/sandbox_flattree_defconfig | 1 - configs/sandbox_noblk_defconfig | 1 - configs/sandbox_spl_defconfig | 1 - configs/smdk5250_defconfig | 2 +- configs/smdk5420_defconfig | 1 - configs/snow_defconfig | 2 +- configs/spring_defconfig | 2 +- drivers/core/read.c | 23 ++ drivers/sound/Makefile | 5 +- drivers/sound/codec-uclass.c | 26 ++ drivers/sound/i2s-uclass.c | 25 ++ drivers/sound/max98095.c | 316 ++++++++--------- drivers/sound/max98095.h | 2 +- drivers/sound/samsung-i2s.c | 139 ++++++-- drivers/sound/samsung_sound.c | 104 ++++++ drivers/sound/sandbox.c | 177 +++++++++- drivers/sound/sound-i2s.c | 208 ----------- drivers/sound/sound-uclass.c | 129 +++++++ drivers/sound/wm8994.c | 475 ++++++++++++-------------- drivers/sound/wm8994.h | 2 +- include/audio_codec.h | 48 +++ include/dm/read.h | 58 ++++ include/dm/uclass-id.h | 3 + include/i2s.h | 33 +- include/sound.h | 72 +++- test/dm/Makefile | 3 + test/dm/audio.c | 34 ++ test/dm/i2s.c | 32 ++ test/dm/sound.c | 34 ++ test/dm/test-fdt.c | 35 ++ 46 files changed, 1483 insertions(+), 733 deletions(-) create mode 100644 drivers/sound/codec-uclass.c create mode 100644 drivers/sound/i2s-uclass.c create mode 100644 drivers/sound/samsung_sound.c delete mode 100644 drivers/sound/sound-i2s.c create mode 100644 drivers/sound/sound-uclass.c create mode 100644 include/audio_codec.h create mode 100644 test/dm/audio.c create mode 100644 test/dm/i2s.c create mode 100644 test/dm/sound.c