From 4dfa93798c59731dcea7452e0da3093cffe551af Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Wed, 18 May 2011 00:17:31 -0500 Subject: [PATCH] --- yaml --- r: 272761 b: refs/heads/master c: 366494250b60af14fbab4d94d6bb1d1b6d17f10b h: refs/heads/master i: 272759: a3105a9772402eb6d42da62f6e192b4dcd3e3bc1 v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-omap2/omap_twl.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 626e6ea0c89c..9d9f338fcb7a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 58e241f7be8dfbb19fa8f5bf8b2e56bb6d655752 +refs/heads/master: 366494250b60af14fbab4d94d6bb1d1b6d17f10b diff --git a/trunk/arch/arm/mach-omap2/omap_twl.c b/trunk/arch/arm/mach-omap2/omap_twl.c index a66bf6b9fb05..5def7c274f75 100644 --- a/trunk/arch/arm/mach-omap2/omap_twl.c +++ b/trunk/arch/arm/mach-omap2/omap_twl.c @@ -134,8 +134,13 @@ static u8 twl6030_uv_to_vsel(unsigned long uv) * 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;