Skip to content

Commit

Permalink
BCM2708: Add HifiBerry DAC to board file
Browse files Browse the repository at this point in the history
This adds the initalization of the HifiBerry DAC
to the mach-bcm2708 board file.

Signed-off-by: Florian Meier <[email protected]>
  • Loading branch information
koalo committed Dec 9, 2013
1 parent ade5dd3 commit a1b99a6
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions arch/arm/mach-bcm2708/bcm2708.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,20 @@ static struct platform_device bcm2708_i2s_device = {
};
#endif

#if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC_MODULE)
static struct platform_device snd_hifiberry_dac_device = {
.name = "snd-hifiberry-dac",
.id = 0,
.num_resources = 0,
};

static struct platform_device snd_pcm5102a_codec_device = {
.name = "pcm5102a-codec",
.id = -1,
.num_resources = 0,
};
#endif

int __init bcm_register_device(struct platform_device *pdev)
{
int ret;
Expand Down Expand Up @@ -769,6 +783,11 @@ void __init bcm2708_init(void)
bcm_register_device(&bcm2708_i2s_device);
#endif

#if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC_MODULE)
bcm_register_device(&snd_hifiberry_dac_device);
bcm_register_device(&snd_pcm5102a_codec_device);
#endif

for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
struct amba_device *d = amba_devs[i];
amba_device_register(d, &iomem_resource);
Expand Down

0 comments on commit a1b99a6

Please sign in to comment.