@@ -13,6 +13,8 @@
* XXX This code should be part of some other TWL/TPS code.
*/
+#include <linux/i2c/twl.h>
+
#include <plat/opp_twl_tps.h>
/**
@@ -24,6 +26,9 @@
*/
unsigned long omap_twl_vsel_to_uv(const u8 vsel)
{
+ if (twl_class_is_6030())
+ return ((((vsel - 1) * 125) + 7000)) * 100;
+
return (((vsel * 125) + 6000)) * 100;
}
@@ -37,5 +42,8 @@ unsigned long omap_twl_vsel_to_uv(const u8 vsel)
u8 omap_twl_uv_to_vsel(unsigned long uv)
{
/* Round up to higher voltage */
+ if (twl_class_is_6030())
+ return DIV_ROUND_UP(uv - 700000, 12500) + 1;
+
return DIV_ROUND_UP(uv - 600000, 12500);
}