Skip to content

Commit

Permalink
sh: mach-ecovec24: Add motion sensor driver support.
Browse files Browse the repository at this point in the history
This patch adds support for the lis3lv02d motion sensor connected via
i2c on the Ecovec board. Tested with evtest.

Signed-off-by: NISHIMOTO Hiroki <nishimoto.hiroki@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
NISHIMOTO Hiroki authored and Paul Mundt committed Jan 14, 2010
1 parent 61c39bb commit ea44078
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/sh/boards/mach-ecovec24/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,10 @@ static struct i2c_board_info i2c1_devices[] = {
{
I2C_BOARD_INFO("r2025sd", 0x32),
},
{
I2C_BOARD_INFO("lis3lv02d", 0x1c),
.irq = 33,
}
};

/* KEYSC */
Expand Down Expand Up @@ -1115,6 +1119,10 @@ static int __init arch_setup(void)
gpio_direction_output(GPIO_PTU0, 0);
mdelay(20);

/* enable motion sensor */
gpio_request(GPIO_FN_INTC_IRQ1, NULL);
gpio_direction_input(GPIO_FN_INTC_IRQ1);

/* enable I2C device */
i2c_register_board_info(0, i2c0_devices,
ARRAY_SIZE(i2c0_devices));
Expand Down

0 comments on commit ea44078

Please sign in to comment.