[alsa-devel] [PATCH, RFC 3/3] pxa/magician: add I2C board info and platform data for UDA1380

Philipp Zabel philipp.zabel at gmail.com
Sun Jun 14 12:51:32 CEST 2009


Configures I2C address, power/reset GPIOs and DAC clock from WSPLL.

Signed-off-by: Philipp Zabel <philipp.zabel at gmail.com>
---
 arch/arm/mach-pxa/magician.c |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index 869f083..3da8284 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -43,6 +43,8 @@
 #include <mach/irda.h>
 #include <mach/ohci.h>
 
+#include <sound/uda1380.h>
+
 #include "devices.h"
 #include "generic.h"
 
@@ -862,9 +864,22 @@ static struct platform_device calypso = {
 };
 
 /*
- * I2C
+ * Philips UDA1380 on I2C
  */
 
+static struct uda1380_platform_data uda1380_info = {
+	.gpio_power = EGPIO_MAGICIAN_CODEC_POWER,
+	.gpio_reset = EGPIO_MAGICIAN_CODEC_RESET,
+	.dac_clk    = UDA1380_DAC_CLK_WSPLL,
+};
+
+static struct i2c_board_info i2c_board_info[] = {
+	{
+		I2C_BOARD_INFO("uda1380", 0x18),
+		.platform_data = &uda1380_info,
+	},
+};
+
 static struct i2c_pxa_platform_data i2c_info = {
 	.fast_mode = 1,
 };
@@ -906,6 +921,7 @@ static void __init magician_init(void)
 	}
 	pxa27x_set_i2c_power_info(NULL);
 	pxa_set_i2c_info(&i2c_info);
+	i2c_register_board_info(0, ARRAY_AND_SIZE(i2c_board_info));
 	i2c_register_board_info(1, ARRAY_AND_SIZE(pi2c_board_info));
 	pxa_set_mci_info(&magician_mci_info);
 	pxa_set_ohci_info(&magician_ohci_info);
-- 
1.6.3.1



More information about the Alsa-devel mailing list