[U-Boot] [PATCH v2 00/22] dm: sound: Convert to driver model

Simon Glass sjg at chromium.org
Mon Dec 10 17:37:29 UTC 2018


The sound subsystem has never been converted to driver model. It is is a
little bit complicated 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. This is tested on snow,
pit and pi. I do not have smdk5250/5420 or arndale to test with.

Changes in v2:
- Add fix for pit and pi also
- Fix up tabs in this commit instead of the later one
- Use Kconfig instead of defconfig to define DM_SOUND
- Update 'init' command to print the error code
- Correct conversion for pit
- Use void * for i2c and sound data
- Add new patch to move common code out of maxim98095
- Add new patch with support for max98090
- Correct conversion for pit and pi, updating commit message
- Add new patch to convert sandbox to use driver model
- Drop CONFIG_DM_SOUND from all defconfig files
- Fix up sandbox files to remove old code
- Update the rest of the samsung boards
- Remove unused sandbox code also
- Drop patches previously applied
- Add new patch to fix license headers
- Add new patch to tidy up error codes in max98095
- Add new patch to use the correct number of channels for sound

Simon Glass (22):
  dm: sound: exynos: Correct codec bus addresses
  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: sandbox: Update sound to use two buffers
  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
  exynos: Add proid_is_exynos542x() for common 542x
  exynos: Add support for exynos5420 i2s pinmux
  dm: sound: Move common code out of maxim98095
  dm: sound: exynos: Add support for max98090
  dm: exynos: sound: Convert to use driver model
  dm: sandbox: sound: Convert to use driver model
  dm: exynos: Drop CONFIG_DM_I2C_COMPAT
  dm: sound: Complete migration to driver model
  dm: sound: Fix license headers
  dm: sound: max98095: Tidy up error codes
  dm: sandbox: Allow selection of sample rate and channels
  dm: sound: Use the correct number of channels for sound

 arch/Kconfig                              |   1 +
 arch/arm/dts/exynos5250-smdk5250.dts      |  21 +-
 arch/arm/dts/exynos5250-snow.dts          |  23 +-
 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              |  14 +
 arch/arm/dts/exynos5800-peach-pi.dts      |  24 +-
 arch/arm/mach-exynos/clock.c              |  31 +-
 arch/arm/mach-exynos/clock_init_exynos5.c |   2 +-
 arch/arm/mach-exynos/common_setup.h       |   4 +-
 arch/arm/mach-exynos/include/mach/clock.h |   3 +
 arch/arm/mach-exynos/include/mach/cpu.h   |   4 +-
 arch/arm/mach-exynos/include/mach/gpio.h  |   4 +-
 arch/arm/mach-exynos/pinmux.c             |  19 +-
 arch/arm/mach-exynos/power.c              |   2 +-
 arch/sandbox/cpu/sdl.c                    | 123 ++--
 arch/sandbox/dts/sandbox.dts              |  21 +
 arch/sandbox/dts/test.dts                 |  23 +
 arch/sandbox/include/asm/sdl.h            |  19 +-
 arch/sandbox/include/asm/sound.h          |  13 -
 arch/sandbox/include/asm/test.h           |  40 ++
 cmd/sound.c                               |  15 +-
 configs/peach-pi_defconfig                |   3 +-
 configs/peach-pit_defconfig               |   3 +-
 configs/smdk5250_defconfig                |   1 -
 configs/smdk5420_defconfig                |   1 -
 configs/snow_defconfig                    |   1 -
 configs/spring_defconfig                  |   1 -
 drivers/core/read.c                       |  23 +
 drivers/sound/Kconfig                     |   8 +
 drivers/sound/Makefile                    |   8 +-
 drivers/sound/codec-uclass.c              |  26 +
 drivers/sound/i2s-uclass.c                |  25 +
 drivers/sound/max98090.c                  | 377 ++++++++++++
 drivers/sound/max98090.h                  | 663 ++++++++++++++++++++++
 drivers/sound/max98095.c                  | 313 ++++------
 drivers/sound/max98095.h                  |   9 +-
 drivers/sound/maxim_codec.c               |  87 +++
 drivers/sound/maxim_codec.h               |  67 +++
 drivers/sound/samsung-i2s.c               | 113 +++-
 drivers/sound/samsung_sound.c             | 104 ++++
 drivers/sound/sandbox.c                   | 177 +++++-
 drivers/sound/sound-i2s.c                 | 208 -------
 drivers/sound/sound-uclass.c              | 127 +++++
 drivers/sound/sound.c                     |  11 +-
 drivers/sound/wm8994.c                    | 114 ++--
 drivers/sound/wm8994.h                    |   2 +-
 include/audio_codec.h                     |  48 ++
 include/dm/read.h                         |  58 ++
 include/dm/uclass-id.h                    |   3 +
 include/i2s.h                             |  36 +-
 include/sound.h                           |  79 ++-
 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 ++
 59 files changed, 2660 insertions(+), 664 deletions(-)
 delete mode 100644 arch/sandbox/include/asm/sound.h
 create mode 100644 drivers/sound/codec-uclass.c
 create mode 100644 drivers/sound/i2s-uclass.c
 create mode 100644 drivers/sound/max98090.c
 create mode 100644 drivers/sound/max98090.h
 create mode 100644 drivers/sound/maxim_codec.c
 create mode 100644 drivers/sound/maxim_codec.h
 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

-- 
2.20.0.rc2.403.gdbc3b29805-goog



More information about the U-Boot mailing list