From: 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> References: <1288195856-11011-1-git-send-email-thara@ti.com> Return-path: 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 In-Reply-To: <1288195856-11011-1-git-send-email-thara@ti.com> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org 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 This patch registers the TWL4030 PMIC specific informtion with the voltage driver. Failing this patch the voltage driver is unware of the formula to use for vsel to voltage and vice versa conversion. Signed-off-by: Thara Gopinath --- arch/arm/plat-omap/opp_twl_tps.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) 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); -- 1.7.0.4