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: NISHIMOTO Hiroki <nishimoto.hiroki@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
parent
61c39bb354
commit
ea44078341
1 changed files with 8 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue