Skip to content

Commit bfd61a6

Browse files
koalopopcornmix
authored andcommitted
BCM2708: Add HifiBerry DAC to board file
This adds the initalization of the HifiBerry DAC to the mach-bcm2708 board file. Signed-off-by: Florian Meier <florian.meier@koalo.de>
1 parent 72874cf commit bfd61a6

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

‎arch/arm/mach-bcm2708/bcm2708.c‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,20 @@ static struct platform_device bcm2708_i2s_device = {
628628
};
629629
#endif
630630

631+
#if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC_MODULE)
632+
static struct platform_device snd_hifiberry_dac_device = {
633+
.name = "snd-hifiberry-dac",
634+
.id = 0,
635+
.num_resources = 0,
636+
};
637+
638+
static struct platform_device snd_pcm5102a_codec_device = {
639+
.name = "pcm5102a-codec",
640+
.id = -1,
641+
.num_resources = 0,
642+
};
643+
#endif
644+
631645
int __init bcm_register_device(struct platform_device *pdev)
632646
{
633647
int ret;
@@ -754,6 +768,11 @@ void __init bcm2708_init(void)
754768
bcm_register_device(&bcm2708_i2s_device);
755769
#endif
756770

771+
#if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC_MODULE)
772+
bcm_register_device(&snd_hifiberry_dac_device);
773+
bcm_register_device(&snd_pcm5102a_codec_device);
774+
#endif
775+
757776
for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
758777
struct amba_device *d = amba_devs[i];
759778
amba_device_register(d, &iomem_resource);

0 commit comments

Comments
 (0)