diff options
author | NISHIMOTO Hiroki <nishimoto.hiroki@renesas.com> | 2010-01-14 18:25:00 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-01-14 18:25:00 -0500 |
commit | ea4407834118405ef419e9b07794ceacadc01bae (patch) | |
tree | 1362babe2bc49f8bdf48d76d9ec4a845f2b8faae /arch/sh | |
parent | 61c39bb354a1f791ba6f562b766a72e508a036ee (diff) |
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>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/boards/mach-ecovec24/setup.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 6a8861b39f05..5c246289b4f0 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c | |||
@@ -353,6 +353,10 @@ static struct i2c_board_info i2c1_devices[] = { | |||
353 | { | 353 | { |
354 | I2C_BOARD_INFO("r2025sd", 0x32), | 354 | I2C_BOARD_INFO("r2025sd", 0x32), |
355 | }, | 355 | }, |
356 | { | ||
357 | I2C_BOARD_INFO("lis3lv02d", 0x1c), | ||
358 | .irq = 33, | ||
359 | } | ||
356 | }; | 360 | }; |
357 | 361 | ||
358 | /* KEYSC */ | 362 | /* KEYSC */ |
@@ -1115,6 +1119,10 @@ static int __init arch_setup(void) | |||
1115 | gpio_direction_output(GPIO_PTU0, 0); | 1119 | gpio_direction_output(GPIO_PTU0, 0); |
1116 | mdelay(20); | 1120 | mdelay(20); |
1117 | 1121 | ||
1122 | /* enable motion sensor */ | ||
1123 | gpio_request(GPIO_FN_INTC_IRQ1, NULL); | ||
1124 | gpio_direction_input(GPIO_FN_INTC_IRQ1); | ||
1125 | |||
1118 | /* enable I2C device */ | 1126 | /* enable I2C device */ |
1119 | i2c_register_board_info(0, i2c0_devices, | 1127 | i2c_register_board_info(0, i2c0_devices, |
1120 | ARRAY_SIZE(i2c0_devices)); | 1128 | ARRAY_SIZE(i2c0_devices)); |