* [PATCH] sh: mach-ecovec24: Add motion sensor driver support
@ 2010-01-14 9:53 NISHIMOTO Hiroki
2010-01-14 23:29 ` Paul Mundt
0 siblings, 1 reply; 2+ messages in thread
From: NISHIMOTO Hiroki @ 2010-01-14 9:53 UTC (permalink / raw)
To: linux-sh
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
Signed-off-by: NISHIMOTO Hiroki <nishimoto.hiroki@renesas.com>
---
arch/sh/boards/mach-ecovec24/setup.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/arch/sh/boards/mach-ecovec24/setup.c
b/arch/sh/boards/mach-ecovec24/setup.c
index 6a8861b..2ea2df5 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -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));
--
1.6.3.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sh: mach-ecovec24: Add motion sensor driver support
2010-01-14 9:53 [PATCH] sh: mach-ecovec24: Add motion sensor driver support NISHIMOTO Hiroki
@ 2010-01-14 23:29 ` Paul Mundt
0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2010-01-14 23:29 UTC (permalink / raw)
To: linux-sh
On Thu, Jan 14, 2010 at 06:53:09PM +0900, NISHIMOTO Hiroki wrote:
> 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
>
> Signed-off-by: NISHIMOTO Hiroki <nishimoto.hiroki@renesas.com>
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-14 23:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-14 9:53 [PATCH] sh: mach-ecovec24: Add motion sensor driver support NISHIMOTO Hiroki
2010-01-14 23:29 ` Paul Mundt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.