aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_twl.c
diff options
context:
space:
mode:
authorNishanth Menon <nm@ti.com>2011-05-18 00:17:32 -0500
committerKevin Hilman <khilman@ti.com>2011-06-03 10:13:53 -0700
commit5437260888ab8c3e77762f554c6d18531e5ae019 (patch)
treeba8d5e0b0ed1c25ba29be7d65104afb02856cc30 /arch/arm/mach-omap2/omap_twl.c
parent8548724dbe693101a96d801c27b4129935676075 (diff)
downloadkernel_samsung_espresso10-5437260888ab8c3e77762f554c6d18531e5ae019.zip
kernel_samsung_espresso10-5437260888ab8c3e77762f554c6d18531e5ae019.tar.gz
kernel_samsung_espresso10-5437260888ab8c3e77762f554c6d18531e5ae019.tar.bz2
OMAP4: PM: TWL6030: address 0V conversions
0V conversions should be mapped to 0 as it is meant to denote off voltages. Signed-off-by: Nishanth Menon <nm@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_twl.c')
-rw-r--r--arch/arm/mach-omap2/omap_twl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c
index 5def7c2..b30adf3 100644
--- a/arch/arm/mach-omap2/omap_twl.c
+++ b/arch/arm/mach-omap2/omap_twl.c
@@ -95,6 +95,8 @@ static unsigned long twl6030_vsel_to_uv(const u8 vsel)
is_offset_valid = true;
}
+ if (!vsel)
+ return 0;
/*
* There is no specific formula for voltage to vsel
* conversion above 1.3V. There are special hardcoded
@@ -127,6 +129,8 @@ static u8 twl6030_uv_to_vsel(unsigned long uv)
is_offset_valid = true;
}
+ if (!uv)
+ return 0x00;
/*
* There is no specific formula for voltage to vsel
* conversion above 1.3V. There are special hardcoded