Skip to content

Commit

Permalink
ARM: nomadik: register the I2C devices
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Linus Walleij committed Jun 10, 2012
1 parent 661d414 commit d088f67
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions arch/arm/mach-nomadik/board-nhk8815.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/mtd/nand.h>
#include <linux/mtd/onenand.h>
#include <linux/mtd/partitions.h>
#include <linux/i2c.h>
#include <linux/io.h>
#include <asm/hardware/vic.h>
#include <asm/sizes.h>
Expand Down Expand Up @@ -242,6 +243,30 @@ static struct sys_timer nomadik_timer = {
.init = nomadik_timer_init,
};

static struct i2c_board_info __initdata nhk8815_i2c0_devices[] = {
{
I2C_BOARD_INFO("stw4811", 0x2d),
},
};

static struct i2c_board_info __initdata nhk8815_i2c1_devices[] = {
{
I2C_BOARD_INFO("camera", 0x10),
},
{
I2C_BOARD_INFO("stw5095", 0x1a),
},
{
I2C_BOARD_INFO("lis3lv02dl", 0x1d),
},
};

static struct i2c_board_info __initdata nhk8815_i2c2_devices[] = {
{
I2C_BOARD_INFO("stw4811-usb", 0x2d),
},
};

static void __init nhk8815_platform_init(void)
{
cpu8815_platform_init();
Expand All @@ -251,6 +276,13 @@ static void __init nhk8815_platform_init(void)

amba_apb_device_add(NULL, "uart0", NOMADIK_UART0_BASE, SZ_4K, IRQ_UART0, 0, NULL, 0);
amba_apb_device_add(NULL, "uart1", NOMADIK_UART1_BASE, SZ_4K, IRQ_UART1, 0, NULL, 0);

i2c_register_board_info(0, nhk8815_i2c0_devices,
ARRAY_SIZE(nhk8815_i2c0_devices));
i2c_register_board_info(1, nhk8815_i2c1_devices,
ARRAY_SIZE(nhk8815_i2c1_devices));
i2c_register_board_info(2, nhk8815_i2c2_devices,
ARRAY_SIZE(nhk8815_i2c2_devices));
}

MACHINE_START(NOMADIK, "NHK8815")
Expand Down

0 comments on commit d088f67

Please sign in to comment.