From patchwork Thu Apr 22 07:06:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 94034 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3M77U24003553 for ; Thu, 22 Apr 2010 07:07:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752436Ab0DVHHO (ORCPT ); Thu, 22 Apr 2010 03:07:14 -0400 Received: from compulab.co.il ([67.18.134.219]:49739 "EHLO compulab.co.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751433Ab0DVHHM (ORCPT ); Thu, 22 Apr 2010 03:07:12 -0400 Received: from [62.90.235.247] (helo=zimbra-mta.compulab.co.il) by compulab.site5.com with esmtp (Exim 4.69) (envelope-from ) id 1O4qVD-0006ES-Tk for linux-omap@vger.kernel.org; Thu, 22 Apr 2010 02:07:12 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id DDEFB9A028A for ; Thu, 22 Apr 2010 10:07:10 +0300 (IDT) Received: from zimbra-mta.compulab.co.il ([127.0.0.1]) by localhost (zimbra-mta.compulab.co.il [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SMpjyx5J93zY; Thu, 22 Apr 2010 10:07:09 +0300 (IDT) Received: from droid.compulab.local (droid.compulab.local [10.1.1.77]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 5D4519A0270; Thu, 22 Apr 2010 10:07:09 +0300 (IDT) Received: from droid.compulab.local (localhost [127.0.0.1]) by droid.compulab.local (8.14.0/8.14.0) with ESMTP id o3M768Po012401; Thu, 22 Apr 2010 10:06:08 +0300 Received: (from mike@localhost) by droid.compulab.local (8.14.4/8.14.0/Submit) id o3M766jG012400; Thu, 22 Apr 2010 10:06:06 +0300 X-Authentication-Warning: droid.compulab.local: mike set sender to mike@compulab.co.il using -f From: Mike Rapoport To: linux-omap@vger.kernel.org Cc: Yulia Vilensky , Mike Rapoport Subject: [PATCH] OMAP3: cm-t35: enable ds2786 battery gas gauge Date: Thu, 22 Apr 2010 10:06:06 +0300 Message-Id: <1271919966-12366-1-git-send-email-mike@compulab.co.il> X-Mailer: git-send-email 1.6.6.2 X-ACL-Warn: { X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - compulab.site5.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - compulab.co.il X-Source: X-Source-Args: X-Source-Dir: Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 22 Apr 2010 07:07:30 +0000 (UTC) diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index 2de4f79..c28e7bb 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c @@ -687,10 +687,23 @@ static struct i2c_board_info __initdata cm_t35_i2c_boardinfo[] = { }, }; +#define DS2786_RSNS 18 /* Constant sense resistor value */ + +static int cm_t35_ds2786_rsns_val = DS2786_RSNS; + +static struct i2c_board_info __initdata cm_t35_i2c3_boardinfo[] = { + { + I2C_BOARD_INFO("ds2786", 0x36), + .platform_data = &cm_t35_ds2786_rsns_val, + }, +}; + static void __init cm_t35_init_i2c(void) { omap_register_i2c_bus(1, 2600, cm_t35_i2c_boardinfo, ARRAY_SIZE(cm_t35_i2c_boardinfo)); + omap_register_i2c_bus(3, 400, cm_t35_i2c3_boardinfo, + ARRAY_SIZE(cm_t35_i2c3_boardinfo)); } static struct omap_board_config_kernel cm_t35_config[] __initdata = {