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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <thara@xxxxxx>
---
 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 <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);
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux