4433d5ed7f3083e2dc368eed7c3a33b11498f3b9
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-3.14 / 0039-BCM2708-Add-HifiBerry-DAC-to-board-file.patch
1 From c5749de8927e1b64eaf5e6c7401a24d1ee0fdc68 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 39/54] 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 diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c
15 index 07da1fd..82b09a5 100644
16 --- a/arch/arm/mach-bcm2708/bcm2708.c
17 +++ b/arch/arm/mach-bcm2708/bcm2708.c
18 @@ -637,6 +637,20 @@ static struct platform_device bcm2708_i2s_device = {
19 };
20 #endif
21
22 +#if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC_MODULE)
23 +static struct platform_device snd_hifiberry_dac_device = {
24 + .name = "snd-hifiberry-dac",
25 + .id = 0,
26 + .num_resources = 0,
27 +};
28 +
29 +static struct platform_device snd_pcm5102a_codec_device = {
30 + .name = "pcm5102a-codec",
31 + .id = -1,
32 + .num_resources = 0,
33 +};
34 +#endif
35 +
36 int __init bcm_register_device(struct platform_device *pdev)
37 {
38 int ret;
39 @@ -764,6 +778,11 @@ void __init bcm2708_init(void)
40 bcm_register_device(&bcm2708_i2s_device);
41 #endif
42
43 +#if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC_MODULE)
44 + bcm_register_device(&snd_hifiberry_dac_device);
45 + bcm_register_device(&snd_pcm5102a_codec_device);
46 +#endif
47 +
48 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
49 struct amba_device *d = amba_devs[i];
50 amba_device_register(d, &iomem_resource);
51 --
52 1.9.1
53