0039-BCM2708-Added-support-for-HiFiBerry-Digi-board-Board.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. From 2a04dad39006e26f9ee4c56e78255d5e4dc20075 Mon Sep 17 00:00:00 2001
  2. From: Daniel Matuschek <info@crazy-audio.com>
  3. Date: Thu, 16 Jan 2014 07:26:08 +0100
  4. Subject: [PATCH 039/114] BCM2708: Added support for HiFiBerry Digi board Board
  5. initalization by I2C
  6. Signed-off-by: Daniel Matuschek <daniel@matuschek.net>
  7. ---
  8. arch/arm/mach-bcm2708/bcm2708.c | 20 ++++++++++++++++++++
  9. 1 file changed, 20 insertions(+)
  10. --- a/arch/arm/mach-bcm2708/bcm2708.c
  11. +++ b/arch/arm/mach-bcm2708/bcm2708.c
  12. @@ -623,6 +623,21 @@ static struct platform_device snd_pcm510
  13. };
  14. #endif
  15. +#if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI_MODULE)
  16. +static struct platform_device snd_hifiberry_digi_device = {
  17. + .name = "snd-hifiberry-digi",
  18. + .id = 0,
  19. + .num_resources = 0,
  20. +};
  21. +
  22. +static struct i2c_board_info __initdata snd_wm8804_i2c_devices[] = {
  23. + {
  24. + I2C_BOARD_INFO("wm8804", 0x3b)
  25. + },
  26. +};
  27. +
  28. +#endif
  29. +
  30. #if defined(CONFIG_SND_BCM2708_SOC_RPI_DAC) || defined(CONFIG_SND_BCM2708_SOC_RPI_DAC_MODULE)
  31. static struct platform_device snd_rpi_dac_device = {
  32. .name = "snd-rpi-dac",
  33. @@ -766,6 +781,11 @@ void __init bcm2708_init(void)
  34. bcm_register_device(&snd_pcm5102a_codec_device);
  35. #endif
  36. +#if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI_MODULE)
  37. + bcm_register_device(&snd_hifiberry_digi_device);
  38. + i2c_register_board_info(1, snd_wm8804_i2c_devices, ARRAY_SIZE(snd_wm8804_i2c_devices));
  39. +#endif
  40. +
  41. #if defined(CONFIG_SND_BCM2708_SOC_RPI_DAC) || defined(CONFIG_SND_BCM2708_SOC_RPI_DAC_MODULE)
  42. bcm_register_device(&snd_rpi_dac_device);
  43. bcm_register_device(&snd_pcm1794a_codec_device);