From patchwork Wed Oct 27 16:10:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thara Gopinath X-Patchwork-Id: 286062 X-Patchwork-Delegate: khilman@deeprootsystems.com 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 o9RGBeXp012572 for ; Wed, 27 Oct 2010 16:11:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761317Ab0J0QLP (ORCPT ); Wed, 27 Oct 2010 12:11:15 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:56235 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759856Ab0J0QLK (ORCPT ); Wed, 27 Oct 2010 12:11:10 -0400 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id o9RGB5Ml026092 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 27 Oct 2010 11:11:07 -0500 Received: from localhost.localdomain (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id o9RGAwKQ009583; Wed, 27 Oct 2010 21:41:02 +0530 (IST) From: Thara Gopinath To: linux-omap@vger.kernel.org Cc: paul@pwsan.com, khilman@deeprootsystems.com, b-cousson@ti.com, vishwanath.bs@ti.com, sawant@ti.com, Thara Gopinath Subject: [PATCH v4 9/9] OMAP3: PM: Register TWL4030 pmic info with the voltage driver. Date: Wed, 27 Oct 2010 21:40:56 +0530 Message-Id: <1288195856-11011-10-git-send-email-thara@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1288195856-11011-1-git-send-email-thara@ti.com> References: <1288195856-11011-1-git-send-email-thara@ti.com> 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]); Wed, 27 Oct 2010 16:11:40 +0000 (UTC) diff --git a/arch/arm/plat-omap/opp_twl_tps.c b/arch/arm/plat-omap/opp_twl_tps.c index 112f106..4448fc5 100644 --- a/arch/arm/plat-omap/opp_twl_tps.c +++ b/arch/arm/plat-omap/opp_twl_tps.c @@ -13,7 +13,10 @@ * XXX This code should be part of some other TWL/TPS code. */ +#include + #include +#include /** * omap_twl_vsel_to_vdc - convert TWL/TPS VSEL value to microvolts DC @@ -39,3 +42,17 @@ u8 omap_twl_uv_to_vsel(unsigned long uv) /* Round up to higher voltage */ return DIV_ROUND_UP(uv - 600000, 12500); } + +static struct omap_volt_pmic_info twl_volt_info = { + .slew_rate = 4000, + .step_size = 12500, + .vsel_to_uv = omap_twl_vsel_to_uv, + .uv_to_vsel = omap_twl_uv_to_vsel, +}; + +static int __init omap_twl_init(void) +{ + omap_voltage_register_pmic(&twl_volt_info); + return 0; +} +arch_initcall(omap_twl_init);