summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 58e241f)
raw | patch | inline | side by side (parent: 58e241f)
author | Nishanth Menon <nm@ti.com> | |
Wed, 18 May 2011 05:17:31 +0000 (00:17 -0500) | ||
committer | Kevin Hilman <khilman@ti.com> | |
Thu, 15 Sep 2011 19:09:36 +0000 (12:09 -0700) |
using 1.35V as a check is not correct, we know that beyond 0x39,
voltages are non linear - hence use the conversion iff uV greater
than that for 0x39. For example, with 709mV as the smps offset,
the max linear is actually 1.41V(0x39vsel)!
Signed-off-by: Nishanth Menon <nm@ti.com>
voltages are non linear - hence use the conversion iff uV greater
than that for 0x39. For example, with 709mV as the smps offset,
the max linear is actually 1.41V(0x39vsel)!
Signed-off-by: Nishanth Menon <nm@ti.com>
arch/arm/mach-omap2/omap_twl.c | patch | blob | history |
index a66bf6b9fb056a9ab77c73540418f51144a3933d..5def7c274f75f1aaba2ab7b935bf37495d3defd8 100644 (file)
* hardcoding only for 1.35 V which is used for 1GH OPP for
* OMAP4430.
*/
- if (uv == 1350000)
+ if (uv > twl6030_vsel_to_uv(0x39)) {
+ if (uv == 1350000)
+ return 0x3A;
+ pr_err("%s:OUT OF RANGE! non mapped vsel for %ld Vs max %ld\n",
+ __func__, uv, twl6030_vsel_to_uv(0x39));
return 0x3A;
+ }
if (smps_offset & 0x8)
return DIV_ROUND_UP(uv - 709000, 12660) + 1;