diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2012-01-25 08:37:58 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-06-10 12:41:56 -0400 |
commit | d088f671e413ec1a58ebf9adc288ca93346f9b8e (patch) | |
tree | 67db03096d91043fb9e4cfff40dc982e88857e85 /arch/arm/mach-nomadik/board-nhk8815.c | |
parent | 661d414cb4492590f70f01c29212213947aea364 (diff) |
ARM: nomadik: register the I2C devices
Add board data to register all the Nomadik I2C devices.
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-nomadik/board-nhk8815.c')
-rw-r--r-- | arch/arm/mach-nomadik/board-nhk8815.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c index 43b844eb9244..029a741fd9f2 100644 --- a/arch/arm/mach-nomadik/board-nhk8815.c +++ b/arch/arm/mach-nomadik/board-nhk8815.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/mtd/nand.h> | 20 | #include <linux/mtd/nand.h> |
21 | #include <linux/mtd/onenand.h> | 21 | #include <linux/mtd/onenand.h> |
22 | #include <linux/mtd/partitions.h> | 22 | #include <linux/mtd/partitions.h> |
23 | #include <linux/i2c.h> | ||
23 | #include <linux/io.h> | 24 | #include <linux/io.h> |
24 | #include <asm/hardware/vic.h> | 25 | #include <asm/hardware/vic.h> |
25 | #include <asm/sizes.h> | 26 | #include <asm/sizes.h> |
@@ -242,6 +243,30 @@ static struct sys_timer nomadik_timer = { | |||
242 | .init = nomadik_timer_init, | 243 | .init = nomadik_timer_init, |
243 | }; | 244 | }; |
244 | 245 | ||
246 | static struct i2c_board_info __initdata nhk8815_i2c0_devices[] = { | ||
247 | { | ||
248 | I2C_BOARD_INFO("stw4811", 0x2d), | ||
249 | }, | ||
250 | }; | ||
251 | |||
252 | static struct i2c_board_info __initdata nhk8815_i2c1_devices[] = { | ||
253 | { | ||
254 | I2C_BOARD_INFO("camera", 0x10), | ||
255 | }, | ||
256 | { | ||
257 | I2C_BOARD_INFO("stw5095", 0x1a), | ||
258 | }, | ||
259 | { | ||
260 | I2C_BOARD_INFO("lis3lv02dl", 0x1d), | ||
261 | }, | ||
262 | }; | ||
263 | |||
264 | static struct i2c_board_info __initdata nhk8815_i2c2_devices[] = { | ||
265 | { | ||
266 | I2C_BOARD_INFO("stw4811-usb", 0x2d), | ||
267 | }, | ||
268 | }; | ||
269 | |||
245 | static void __init nhk8815_platform_init(void) | 270 | static void __init nhk8815_platform_init(void) |
246 | { | 271 | { |
247 | cpu8815_platform_init(); | 272 | cpu8815_platform_init(); |
@@ -251,6 +276,13 @@ static void __init nhk8815_platform_init(void) | |||
251 | 276 | ||
252 | amba_apb_device_add(NULL, "uart0", NOMADIK_UART0_BASE, SZ_4K, IRQ_UART0, 0, NULL, 0); | 277 | amba_apb_device_add(NULL, "uart0", NOMADIK_UART0_BASE, SZ_4K, IRQ_UART0, 0, NULL, 0); |
253 | amba_apb_device_add(NULL, "uart1", NOMADIK_UART1_BASE, SZ_4K, IRQ_UART1, 0, NULL, 0); | 278 | amba_apb_device_add(NULL, "uart1", NOMADIK_UART1_BASE, SZ_4K, IRQ_UART1, 0, NULL, 0); |
279 | |||
280 | i2c_register_board_info(0, nhk8815_i2c0_devices, | ||
281 | ARRAY_SIZE(nhk8815_i2c0_devices)); | ||
282 | i2c_register_board_info(1, nhk8815_i2c1_devices, | ||
283 | ARRAY_SIZE(nhk8815_i2c1_devices)); | ||
284 | i2c_register_board_info(2, nhk8815_i2c2_devices, | ||
285 | ARRAY_SIZE(nhk8815_i2c2_devices)); | ||
254 | } | 286 | } |
255 | 287 | ||
256 | MACHINE_START(NOMADIK, "NHK8815") | 288 | MACHINE_START(NOMADIK, "NHK8815") |