From patchwork Fri Sep 14 09:14:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tetsuyuki Kobayashi X-Patchwork-Id: 1456341 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 254FBDF280 for ; Fri, 14 Sep 2012 09:15:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757754Ab2INJPq (ORCPT ); Fri, 14 Sep 2012 05:15:46 -0400 Received: from vrgw5.firstserver.ne.jp ([164.46.1.48]:57591 "EHLO vrgw5.firstserver.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753837Ab2INJPq (ORCPT ); Fri, 14 Sep 2012 05:15:46 -0400 Received: from fvrsp17.firstserver.ne.jp (fvrsp17.firstserver.ne.jp [203.183.56.3]) by vrgw5.firstserver.ne.jp (8.13.8/8.13.8/FirstServer) with ESMTP id q8E9FgcU023083; Fri, 14 Sep 2012 18:15:42 +0900 (envelope-from koba@kmckk.co.jp) Received: from 203.137.25.97 (203.137.25.97) by fvrsp17.firstserver.ne.jp (F-Secure/virusgw_smtp/407/fvrsp17.firstserver.ne.jp); Fri, 14 Sep 2012 18:15:42 +0900 (JST) X-Virus-Status: clean(F-Secure/virusgw_smtp/407/fvrsp17.firstserver.ne.jp) Received: from localhost (58-188-103-12f2.kns1.eonet.ne.jp [58.188.103.12]) (authenticated (0 bits)) by mail.kmckk.co.jp (8.14.3/8.11.3) with ESMTP id q8E9Fgie001934; Fri, 14 Sep 2012 18:15:42 +0900 From: Tetsuyuki Kobayashi To: horms@verge.net.au Cc: linux-sh@vger.kernel.org, Tetsuyuki Kobayashi Subject: [PATCH 2/2] ARM: shmobile: kzm9g: enable three-axis digital accelerometer ADXL345 Date: Fri, 14 Sep 2012 18:14:29 +0900 Message-Id: <1347614069-23345-3-git-send-email-koba@kmckk.co.jp> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1347614069-23345-1-git-send-email-koba@kmckk.co.jp> References: <1347614069-23345-1-git-send-email-koba@kmckk.co.jp> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org This patch enables three-axis digital accelerometer ADXL345. Test: sudo cat /dev/input/event2 then tip up the board. You get something from /dev/input/event2. Signed-off-by: Tetsuyuki Kobayashi --- arch/arm/configs/kzm9g_defconfig | 2 ++ arch/arm/mach-shmobile/board-kzm9g.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/arch/arm/configs/kzm9g_defconfig b/arch/arm/configs/kzm9g_defconfig index 2aaa2ff..83047e0 100644 --- a/arch/arm/configs/kzm9g_defconfig +++ b/arch/arm/configs/kzm9g_defconfig @@ -73,6 +73,8 @@ CONFIG_INPUT_EVDEV=y # CONFIG_INPUT_MOUSE is not set CONFIG_INPUT_TOUCHSCREEN=y CONFIG_TOUCHSCREEN_ST1232=y +CONFIG_INPUT_MISC=y +CONFIG_INPUT_ADXL34X=y # CONFIG_LEGACY_PTYS is not set CONFIG_SERIAL_SH_SCI=y CONFIG_SERIAL_SH_SCI_NR_UARTS=9 diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c index 9c045d4..350be1d 100644 --- a/arch/arm/mach-shmobile/board-kzm9g.c +++ b/arch/arm/mach-shmobile/board-kzm9g.c @@ -567,6 +567,10 @@ static struct i2c_board_info i2c0_devices[] = { I2C_BOARD_INFO("ak8975", 0x0c), .irq = intcs_evt2irq(0x3380), /* IRQ28 */ }, + { + I2C_BOARD_INFO("adxl34x", 0x1d), + .irq = intcs_evt2irq(0x3340), /* IRQ26 */ + }, }; static struct i2c_board_info i2c1_devices[] = {