From patchwork Thu Jan 14 09:53:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NISHIMOTO Hiroki X-Patchwork-Id: 72816 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0E9s0mC032045 for ; Thu, 14 Jan 2010 09:54:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751917Ab0ANJxi (ORCPT ); Thu, 14 Jan 2010 04:53:38 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755200Ab0ANJxi (ORCPT ); Thu, 14 Jan 2010 04:53:38 -0500 Received: from mail.renesas.com ([202.234.163.13]:37105 "EHLO mail01.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754949Ab0ANJxc (ORCPT ); Thu, 14 Jan 2010 04:53:32 -0500 X-AuditID: ac140384-00000006000004f6-b4-4b4ee98a4240 Received: from guardian03.idc.renesas.com ([172.20.8.202]) by mail01.idc.renesas.com (sendmail) with ESMTP id o0E9rEk4017457; Thu, 14 Jan 2010 18:53:14 +0900 (JST) Received: (from root@localhost) by guardian03.idc.renesas.com with id o0E9rFAN011691; Thu, 14 Jan 2010 18:53:15 +0900 (JST) Received: from mta01.idc.renesas.com (localhost [127.0.0.1]) by mta01.idc.renesas.com with ESMTP id o0E9rEpB012890; Thu, 14 Jan 2010 18:53:14 +0900 (JST) Received: from [127.0.0.1] ([172.30.8.169]) by ims04.idc.renesas.com (Sendmail) with ESMTPA id <0KW800EQ7E4Q59@ims04.idc.renesas.com>; Thu, 14 Jan 2010 18:53:15 +0900 (JST) Date: Thu, 14 Jan 2010 18:53:09 +0900 From: NISHIMOTO Hiroki Subject: [PATCH] sh: mach-ecovec24: Add motion sensor driver support To: linux-sh@vger.kernel.org, lethal@linux-sh.org Cc: Magnus Damm , Kuninori Morimoto Message-id: <4B4EE985.3090908@renesas.com> MIME-version: 1.0 Content-type: text/plain; charset=ISO-2022-JP Content-transfer-encoding: 7bit User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) X-Brightmail-Tracker: AAAAAA== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org 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 #include #include +#include #include #include #include @@ -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));