aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-s3c2410
diff options
context:
space:
mode:
authorJonas Bonn <jonas.bonn@gmail.com>2008-11-19 17:10:56 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2008-11-19 17:10:56 +0000
commit31381aa33f1d494eb8af94f41de8c8c1192b5d8f (patch)
treeb6c32eb3b105fe5eeabaf80ddb7d5bd6298cb3fc /arch/arm/mach-s3c2410
parentacbac4825627e18b1ee979a1d2fda7a0a51dec33 (diff)
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 <jonas.bonn@gmail.com>
Diffstat (limited to 'arch/arm/mach-s3c2410')
-rw-r--r--arch/arm/mach-s3c2410/mach-gta01.c12
1 files changed, 12 insertions, 0 deletions
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 <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,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);