Skip to content

Commit f889d8f

Browse files
Daniel Matuschekpopcornmix
authored andcommitted
BCM2708: Added support for HiFiBerry Digi board Board initalization by I2C
Signed-off-by: Daniel Matuschek <daniel@matuschek.net>
1 parent 7f73737 commit f889d8f

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,21 @@ static struct platform_device snd_pcm5102a_codec_device = {
642642
};
643643
#endif
644644

645+
#if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI_MODULE)
646+
static struct platform_device snd_hifiberry_digi_device = {
647+
.name = "snd-hifiberry-digi",
648+
.id = 0,
649+
.num_resources = 0,
650+
};
651+
652+
static struct i2c_board_info __initdata snd_wm8804_i2c_devices[] = {
653+
{
654+
I2C_BOARD_INFO("wm8804", 0x3b)
655+
},
656+
};
657+
658+
#endif
659+
645660
#if defined(CONFIG_SND_BCM2708_SOC_RPI_DAC) || defined(CONFIG_SND_BCM2708_SOC_RPI_DAC_MODULE)
646661
static struct platform_device snd_rpi_dac_device = {
647662
.name = "snd-rpi-dac",
@@ -787,6 +802,11 @@ void __init bcm2708_init(void)
787802
bcm_register_device(&snd_pcm5102a_codec_device);
788803
#endif
789804

805+
#if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI_MODULE)
806+
bcm_register_device(&snd_hifiberry_digi_device);
807+
i2c_register_board_info(1, snd_wm8804_i2c_devices, ARRAY_SIZE(snd_wm8804_i2c_devices));
808+
#endif
809+
790810
#if defined(CONFIG_SND_BCM2708_SOC_RPI_DAC) || defined(CONFIG_SND_BCM2708_SOC_RPI_DAC_MODULE)
791811
bcm_register_device(&snd_rpi_dac_device);
792812
bcm_register_device(&snd_pcm1794a_codec_device);

0 commit comments

Comments
 (0)