浏览代码

ARM: S5PV310: I2C0/1 devices support on Universal board

Camera devices use the I2C0 and Gyro uese the I2C1 on universal board.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
[kgene.kim@samsung.com: minor title fixes]
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Kyungmin Park 14 年之前
父节点
当前提交
3b7998f529
共有 2 个文件被更改,包括 16 次插入0 次删除
  1. 2 0
      arch/arm/mach-s5pv310/Kconfig
  2. 14 0
      arch/arm/mach-s5pv310/mach-universal_c210.c

+ 2 - 0
arch/arm/mach-s5pv310/Kconfig

@@ -57,6 +57,8 @@ config MACH_UNIVERSAL_C210
 	bool "Mobile UNIVERSAL_C210 Board"
 	bool "Mobile UNIVERSAL_C210 Board"
 	select CPU_S5PV310
 	select CPU_S5PV310
 	select S5P_DEV_ONENAND
 	select S5P_DEV_ONENAND
+	select S3C_DEV_I2C1
+	select S5PV310_SETUP_I2C1
 	help
 	help
 	  Machine support for Samsung Mobile Universal S5PC210 Reference
 	  Machine support for Samsung Mobile Universal S5PC210 Reference
 	  Board. S5PC210(MCP) is one of package option of S5PV310
 	  Board. S5PC210(MCP) is one of package option of S5PV310

+ 14 - 0
arch/arm/mach-s5pv310/mach-universal_c210.c

@@ -10,6 +10,7 @@
 #include <linux/platform_device.h>
 #include <linux/platform_device.h>
 #include <linux/serial_core.h>
 #include <linux/serial_core.h>
 #include <linux/input.h>
 #include <linux/input.h>
+#include <linux/i2c.h>
 #include <linux/gpio_keys.h>
 #include <linux/gpio_keys.h>
 #include <linux/gpio.h>
 #include <linux/gpio.h>
 
 
@@ -116,6 +117,16 @@ static struct platform_device universal_gpio_keys = {
 	},
 	},
 };
 };
 
 
+/* I2C0 */
+static struct i2c_board_info i2c0_devs[] __initdata = {
+	/* Camera, To be updated */
+};
+
+/* I2C1 */
+static struct i2c_board_info i2c1_devs[] __initdata = {
+	/* Gyro, To be updated */
+};
+
 static struct platform_device *universal_devices[] __initdata = {
 static struct platform_device *universal_devices[] __initdata = {
 	&universal_gpio_keys,
 	&universal_gpio_keys,
 	&s5p_device_onenand,
 	&s5p_device_onenand,
@@ -134,6 +145,9 @@ static void __init universal_machine_init(void)
 	l2x0_init(S5P_VA_L2CC, 1 << 28, 0xffffffff);
 	l2x0_init(S5P_VA_L2CC, 1 << 28, 0xffffffff);
 #endif
 #endif
 
 
+	i2c_register_board_info(0, i2c0_devs, ARRAY_SIZE(i2c0_devs));
+	i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
+
 	/* Last */
 	/* Last */
 	platform_add_devices(universal_devices, ARRAY_SIZE(universal_devices));
 	platform_add_devices(universal_devices, ARRAY_SIZE(universal_devices));
 }
 }