From patchwork Sun Oct 28 02:26:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 1657071 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 53AEB40232 for ; Sun, 28 Oct 2012 02:26:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754500Ab2J1C0V (ORCPT ); Sat, 27 Oct 2012 22:26:21 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:41278 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753993Ab2J1C0U (ORCPT ); Sat, 27 Oct 2012 22:26:20 -0400 Received: from ayumi.akashicho.tokyo.vergenet.net (p6117-ipbfp1901kobeminato.hyogo.ocn.ne.jp [114.172.117.117]) by kirsty.vergenet.net (Postfix) with ESMTP id 0752C266CF1; Sun, 28 Oct 2012 13:26:18 +1100 (EST) Received: by ayumi.akashicho.tokyo.vergenet.net (Postfix, from userid 7100) id 7EAB4EDE5BE; Sun, 28 Oct 2012 11:26:15 +0900 (JST) From: Simon Horman To: Arnd Bergmann , Olof Johansson Cc: linux-sh@vger.kernel.org, arm@kernel.org, linux-arm-kernel@lists.infradead.org, Magnus Damm , Paul Mundt , Tetsuyuki Kobayashi , Simon Horman Subject: [PATCH 03/12] ARM: shmobile: kzm9g: enable three-axis digital accelerometer ADXL345 Date: Sun, 28 Oct 2012 11:26:04 +0900 Message-Id: <1351391173-32379-4-git-send-email-horms@verge.net.au> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1351391173-32379-1-git-send-email-horms@verge.net.au> References: <1351391173-32379-1-git-send-email-horms@verge.net.au> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Tetsuyuki Kobayashi 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 Signed-off-by: Simon Horman --- 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 1404b04..ce99e3e 100644 --- a/arch/arm/configs/kzm9g_defconfig +++ b/arch/arm/configs/kzm9g_defconfig @@ -74,6 +74,8 @@ CONFIG_KEYBOARD_GPIO=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 a37da78..1a46422 100644 --- a/arch/arm/mach-shmobile/board-kzm9g.c +++ b/arch/arm/mach-shmobile/board-kzm9g.c @@ -562,6 +562,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[] = {