Skip to content

Commit

Permalink
sh: Add I2C device support for EcoVec24
Browse files Browse the repository at this point in the history
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Kuninori Morimoto authored and Paul Mundt committed Sep 11, 2009
1 parent 682f88a commit 125ecce
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion arch/sh/boards/mach-ecovec24/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,13 @@ static struct platform_device ceu1_device = {
},
};

/* I2C device */
static struct i2c_board_info i2c1_devices[] = {
{
I2C_BOARD_INFO("r2025sd", 0x32),
},
};

static struct platform_device *ecovec_devices[] __initdata = {
&heartbeat_device,
&nor_flash_device,
Expand Down Expand Up @@ -506,10 +513,14 @@ static int __init devices_setup(void)
gpio_request(GPIO_FN_VIO1_CLK, NULL);
platform_resource_setup_memory(&ceu1_device, "ceu1", 4 << 20);

/* enable I2C device */
i2c_register_board_info(1, i2c1_devices,
ARRAY_SIZE(i2c1_devices));

return platform_add_devices(ecovec_devices,
ARRAY_SIZE(ecovec_devices));
}
device_initcall(devices_setup);
arch_initcall(devices_setup);

static struct sh_machine_vector mv_ecovec __initmv = {
.mv_name = "R0P7724 (EcoVec)",
Expand Down

0 comments on commit 125ecce

Please sign in to comment.