Skip to contentSkip to conversation

sh: mach-ecovec24: Add motion sensor driver support

PATCH In review NISHIMOTO Hiroki 2 participants 2 messages Jan 14, 2010 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sh: mach-ecovec24: Add motion sensor driver support

This patch adds support for lis3lv02d motion sensor driver that use i2c interface to the Ecovec board.

I tested the driver with 'evtest' which is available from a below link.
http://beagleboard.googlecode.com/files/evtest.c

---
arch/sh/boards/mach-ecovec24/setup.c | 10 ++++++++++

1 files changed, 10 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/arch/sh/boards/mach-ecovec24/setup.c
index 6a8861b..2ea2df5 100644

arch/sh/boards/mach-ecovec24/setup.c +0 -0
@@ -19,6 +19,7 @@

#include <linux/usb/r8a66597.h>
#include <linux/i2c.h>
#include <linux/i2c/tsc2007.h>
+#include <linux/lis3lv02d.h>
#include <linux/spi/spi.h>
#include <linux/spi/sh_msiof.h>
#include <linux/spi/mmc_spi.h>
@@ -349,10 +350,15 @@ static struct i2c_board_info i2c0_devices[] = { },
};

+#define IRQ1 33
static struct i2c_board_info i2c1_devices[] = {
{
I2C_BOARD_INFO("r2025sd", 0x32),
},
+ {
+ I2C_BOARD_INFO("lis3lv02d", 0x1c),
+ .irq = IRQ1,
+ },
};

/* KEYSC */
@@ -1115,6 +1121,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));

Signature · 1 line
1.6.3.3
#1 lore raw
Quoted 8 lines · NISHIMOTO Hiroki

This patch adds support for lis3lv02d motion sensor driver that use i2c interface to the Ecovec board.

I tested the driver with 'evtest' which is available from a below link.
http://beagleboard.googlecode.com/files/evtest.c

This patch had its whitespace badly damaged by your mailer. I've applied it manually this time, but please look over Documentation/email-clients.txt for suggestions on how to fix this for future patch submissions.