From 31381aa33f1d494eb8af94f41de8c8c1192b5d8f Mon Sep 17 00:00:00 2001 From: Jonas Bonn Date: Wed, 19 Nov 2008 17:10:56 +0000 Subject: GTA01: Do I2C device registration in machine setup code I2C devices should be registered with i2c_register_board_info in the machine setup code. This allows the devices to be auto-probed when the requred driver is loaded. Signed-off-by: Jonas Bonn --- arch/arm/mach-s3c2410/mach-gta01.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'arch') diff --git a/arch/arm/mach-s3c2410/mach-gta01.c b/arch/arm/mach-s3c2410/mach-gta01.c index 567737a5bb6..e0df70e3f29 100644 --- a/arch/arm/mach-s3c2410/mach-gta01.c +++ b/arch/arm/mach-s3c2410/mach-gta01.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -361,6 +362,14 @@ 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) + }, { + I2C_BOARD_INFO("neo1973_lm4857", 0x7c) + } +}; + static struct platform_device *gta01_devices[] __initdata = { &s3c_device_usb, &s3c_device_lcd, @@ -734,6 +743,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); -- cgit v1.2.3