brcm2708: update against latest rpi-3.10.y branch
[openwrt.git] / target / linux / brcm2708 / patches-3.10 / 0121-BCM2708-Add-HifiBerry-DAC-to-board-file.patch
1 From f73a2a0e2756e2959e4e6ae487ce1e1bdd5441f0 Mon Sep 17 00:00:00 2001
2 From: Florian Meier <florian.meier@koalo.de>
3 Date: Fri, 22 Nov 2013 19:21:34 +0100
4 Subject: [PATCH 121/174] BCM2708: Add HifiBerry DAC to board file
5
6 This adds the initalization of the HifiBerry DAC
7 to the mach-bcm2708 board file.
8
9 Signed-off-by: Florian Meier <florian.meier@koalo.de>
10 ---
11  arch/arm/mach-bcm2708/bcm2708.c | 19 +++++++++++++++++++
12  1 file changed, 19 insertions(+)
13
14 --- a/arch/arm/mach-bcm2708/bcm2708.c
15 +++ b/arch/arm/mach-bcm2708/bcm2708.c
16 @@ -639,6 +639,20 @@ static struct platform_device bcm2708_i2
17  };
18  #endif
19  
20 +#if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC_MODULE)
21 +static struct platform_device snd_hifiberry_dac_device = {
22 +        .name = "snd-hifiberry-dac",
23 +        .id = 0,
24 +        .num_resources = 0,
25 +};
26 +
27 +static struct platform_device snd_pcm5102a_codec_device = {
28 +        .name = "pcm5102a-codec",
29 +        .id = -1,
30 +        .num_resources = 0,
31 +};
32 +#endif
33 +
34  int __init bcm_register_device(struct platform_device *pdev)
35  {
36         int ret;
37 @@ -769,6 +783,11 @@ void __init bcm2708_init(void)
38         bcm_register_device(&bcm2708_i2s_device);
39  #endif
40  
41 +#if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC_MODULE)
42 +        bcm_register_device(&snd_hifiberry_dac_device);
43 +        bcm_register_device(&snd_pcm5102a_codec_device);
44 +#endif
45 +
46         for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
47                 struct amba_device *d = amba_devs[i];
48                 amba_device_register(d, &iomem_resource);