From patchwork Fri Oct 1 10:17:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grazvydas Ignotas X-Patchwork-Id: 223182 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o91AHx19001894 for ; Fri, 1 Oct 2010 10:17:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754290Ab0JAKR6 (ORCPT ); Fri, 1 Oct 2010 06:17:58 -0400 Received: from mail-ey0-f174.google.com ([209.85.215.174]:48427 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753849Ab0JAKR5 (ORCPT ); Fri, 1 Oct 2010 06:17:57 -0400 Received: by eyb6 with SMTP id 6so1180833eyb.19 for ; Fri, 01 Oct 2010 03:17:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=k11LEojH+uGhyJWWYgl3s6g09NOrLVN5ixMPET5SRG4=; b=E3DebUIUwJLk1K+mqAsYppzIScj87sBf7/eNlJmTfgGo/bdfJ41UFXL2HmNJnKdDp/ Mkq9vPZ1L/2OZtYfVb6Wmdp1x/i1Nqjm1LRMmF1OOf84nNGfgx0bPwU8dH/4eFSlsMDc sbTfPMx6bb9JTHLmpkqqeNxSyeVFbsNW5ynmI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=uT0uZ09lEVmD5m9+wrvdxUzbcI7WzRDnbQZc3uwVR7djonxtlFIEiV2w6lIl0EBsIw KBixJYrBJH1rX0WJJCe+LEOjnGd9AT+BFGoh+9pfW+nDPwZm2S4cEjX024v8RAHPL2ta gmAWmb1IMUa8uTLAKbH2gs8t+7DlWsYVL3b0Q= Received: by 10.213.52.10 with SMTP id f10mr5241514ebg.60.1285928276334; Fri, 01 Oct 2010 03:17:56 -0700 (PDT) Received: from localhost.localdomain (ip-88-119-226-136.static.b4net.lt [88.119.226.136]) by mx.google.com with ESMTPS id v59sm1489052eeh.22.2010.10.01.03.17.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 01 Oct 2010 03:17:54 -0700 (PDT) From: Grazvydas Ignotas To: linux-omap@vger.kernel.org Cc: Samuel Ortiz , Grazvydas Ignotas Subject: [PATCH] mfd: twl4030: add twl4030_bci platform_data back Date: Fri, 1 Oct 2010 13:17:50 +0300 Message-Id: <1285928270-9302-1-git-send-email-notasas@gmail.com> X-Mailer: git-send-email 1.6.3.3 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 (demeter1.kernel.org [140.211.167.41]); Fri, 01 Oct 2010 10:18:00 +0000 (UTC) diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index b0f2c00..2f5258f 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c @@ -115,6 +115,12 @@ #define twl_has_codec() false #endif +#if defined(CONFIG_CHARGER_TWL4030) || defined(CONFIG_CHARGER_TWL4030_MODULE) +#define twl_has_bci() true +#else +#define twl_has_bci() false +#endif + /* Triton Core internal information (BEGIN) */ /* Last - for index max*/ @@ -826,6 +832,17 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features) return PTR_ERR(child); } + if (twl_has_bci() && pdata->bci && + !(features & (TPS_SUBSET | TWL5031))) { + child = add_child(3, "twl4030_bci", + pdata->bci, sizeof(*pdata->bci), false, + /* irq0 = CHG_PRES, irq1 = BCI */ + pdata->irq_base + BCI_PRES_INTR_OFFSET, + pdata->irq_base + BCI_INTR_OFFSET); + if (IS_ERR(child)) + return PTR_ERR(child); + } + return 0; }