[PATCH 06/11] GTA01: Register WM8753 with i2c_register_board_info

Jonas Bonn jonas.bonn at gmail.com
Wed Oct 1 16:30:43 CEST 2008


I2C does not allow any real probing so devices should be registered statically
where appropriate.  This patch registers the WM8753 codec for the GTA01.  This
allows the WM8753 ALSA driver to work after being converted to the "new-style"
I2C driver interface.
---
 arch/arm/mach-s3c2410/mach-gta01.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s3c2410/mach-gta01.c b/arch/arm/mach-s3c2410/mach-gta01.c
index 567737a..a11c49f 100644
--- a/arch/arm/mach-s3c2410/mach-gta01.c
+++ b/arch/arm/mach-s3c2410/mach-gta01.c
@@ -32,6 +32,7 @@
 #include <linux/init.h>
 #include <linux/workqueue.h>
 #include <linux/platform_device.h>
+#include <linux/i2c.h>
 #include <linux/serial_core.h>
 #include <asm/arch/ts.h>
 #include <linux/spi/spi.h>
@@ -361,6 +362,12 @@ static struct s3c2410fb_mach_info gta01_lcd_cfg __initdata = {
 	.lpcsel		= ((0xCE6) & ~7) | 1<<4,
 };
 
+static struct i2c_board_info gta01_i2c_devs[] __initdata = {
+	{
+		I2C_BOARD_INFO("wm8753", 0x1a),
+	},
+};
+
 static struct platform_device *gta01_devices[] __initdata = {
 	&s3c_device_usb,
 	&s3c_device_lcd,
@@ -734,6 +741,9 @@ static void __init gta01_machine_init(void)
 
 	platform_add_devices(gta01_devices, ARRAY_SIZE(gta01_devices));
 
+	i2c_register_board_info(0, gta01_i2c_devs, 
+		ARRAY_SIZE(gta01_i2c_devs));
+
 	s3c2410_pm_init();
 
 	set_irq_type(GTA01_IRQ_MODEM, IRQ_TYPE_EDGE_RISING);
-- 
1.5.4.3




More information about the openmoko-kernel mailing list