From patchwork Mon Aug 29 16:38:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daiane Angolini X-Patchwork-Id: 112114 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8423EB6F82 for ; Tue, 30 Aug 2011 02:30:02 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qy4iZ-0007ys-8L; Mon, 29 Aug 2011 16:29:47 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qy4iY-00049Z-Py; Mon, 29 Aug 2011 16:29:46 +0000 Received: from ch1ehsobe006.messaging.microsoft.com ([216.32.181.186] helo=ch1outboundpool.messaging.microsoft.com) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qy4iW-00049H-0v for linux-arm-kernel@lists.infradead.org; Mon, 29 Aug 2011 16:29:44 +0000 Received: from mail164-ch1-R.bigfish.com (216.32.181.173) by CH1EHSOBE016.bigfish.com (10.43.70.66) with Microsoft SMTP Server id 14.1.225.22; Mon, 29 Aug 2011 16:29:41 +0000 Received: from mail164-ch1 (localhost.localdomain [127.0.0.1]) by mail164-ch1-R.bigfish.com (Postfix) with ESMTP id 0CF4E14F0302; Mon, 29 Aug 2011 16:29:41 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839h63h) X-Spam-TCS-SCL: 2:0 X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail164-ch1 (localhost.localdomain [127.0.0.1]) by mail164-ch1 (MessageSwitch) id 1314635380851965_27497; Mon, 29 Aug 2011 16:29:40 +0000 (UTC) Received: from CH1EHSMHS011.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.250]) by mail164-ch1.bigfish.com (Postfix) with ESMTP id 3C5DDE3804B; Mon, 29 Aug 2011 16:29:40 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS011.bigfish.com (10.43.70.11) with Microsoft SMTP Server (TLS) id 14.1.225.22; Mon, 29 Aug 2011 16:29:35 +0000 Received: from az33smr02.freescale.net (10.64.34.200) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server id 14.1.323.2; Mon, 29 Aug 2011 11:29:33 -0500 Received: from b19406.am.freescale.net ([10.29.244.3]) by az33smr02.freescale.net (8.13.1/8.13.0) with ESMTP id p7TGTSCP019143; Mon, 29 Aug 2011 11:29:32 -0500 (CDT) From: Daiane Angolini To: Subject: [PATCH] ARM: mx53_ard: Add support for the accelerometer Date: Mon, 29 Aug 2011 13:38:26 -0300 Message-ID: <1314635906-18962-1-git-send-email-daiane.angolini@freescale.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110829_122944_165972_1231124E X-CRM114-Status: GOOD ( 15.03 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [216.32.181.186 listed in list.dnswl.org] Cc: kernel@pengutronix.de, Daiane Angolini X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org mx53_ard has a MMA8451 accelerometer connected to i2c2. Add support for it. Signed-off-by: Daiane Angolini --- arch/arm/mach-mx5/board-mx53_ard.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-mx5/board-mx53_ard.c b/arch/arm/mach-mx5/board-mx53_ard.c index ddc3015..b6dc812 100644 --- a/arch/arm/mach-mx5/board-mx53_ard.c +++ b/arch/arm/mach-mx5/board-mx53_ard.c @@ -161,6 +161,12 @@ static const struct esdhc_platform_data mx53_ard_sd1_data __initconst = { .wp_gpio = ARD_SD1_WP, }; +static struct i2c_board_info mx53ard_i2c_devices[] = { + { + I2C_BOARD_INFO("mma8450", 0x1C), + }, +}; + static struct imxi2c_platform_data mx53_ard_i2c2_data = { .bitrate = 50000, }; @@ -231,6 +237,8 @@ static void __init mx53_ard_board_init(void) imx53_add_sdhci_esdhc_imx(0, &mx53_ard_sd1_data); imx53_add_imx2_wdt(0, NULL); + i2c_register_board_info(2, mx53ard_i2c_devices, + ARRAY_SIZE(mx53ard_i2c_devices)); imx53_add_imx_i2c(1, &mx53_ard_i2c2_data); imx53_add_imx_i2c(2, &mx53_ard_i2c3_data); imx_add_gpio_keys(&ard_button_data);