提交 ea440783 编写于 作者: N NISHIMOTO Hiroki 提交者: 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: NNISHIMOTO Hiroki <nishimoto.hiroki@renesas.com>
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册