diff mbox

[v4,9/9] OMAP3: PM: Register TWL4030 pmic info with the voltage driver.

Message ID 1288195856-11011-10-git-send-email-thara@ti.com (mailing list archive)
State Superseded
Delegated to: Kevin Hilman
Headers show

Commit Message

Thara Gopinath Oct. 27, 2010, 4:10 p.m. UTC
None
diff mbox

Patch

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 <linux/module.h>
+
 #include <plat/opp_twl_tps.h>
+#include <plat/voltage.h>
 
 /**
  * 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);