Commit ea440783 authored by NISHIMOTO Hiroki's avatar NISHIMOTO Hiroki Committed by Paul Mundt

sh: mach-ecovec24: Add motion sensor driver support.

This patch adds support for the lis3lv02d motion sensor connected via
i2c on the Ecovec board. Tested with evtest.
Signed-off-by: default avatarNISHIMOTO Hiroki <nishimoto.hiroki@renesas.com>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 61c39bb3
......@@ -353,6 +353,10 @@ static struct i2c_board_info i2c1_devices[] = {
{
I2C_BOARD_INFO("r2025sd", 0x32),
},
{
I2C_BOARD_INFO("lis3lv02d", 0x1c),
.irq = 33,
}
};
/* KEYSC */
......@@ -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));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment