diff options
author | Nishanth Menon <nm@ti.com> | 2011-05-18 01:17:32 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-09-15 15:09:36 -0400 |
commit | 2aed5b9e8877237886453f138be7ecea224b32b0 (patch) | |
tree | 438f32825d7dd28277f7acc7826daa29924c414b /arch | |
parent | 366494250b60af14fbab4d94d6bb1d1b6d17f10b (diff) |
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')
-rw-r--r-- | arch/arm/mach-omap2/omap_twl.c | 4 |
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 5def7c274f75..b30adf349b73 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) | |||
95 | is_offset_valid = true; | 95 | is_offset_valid = true; |
96 | } | 96 | } |
97 | 97 | ||
98 | if (!vsel) | ||
99 | return 0; | ||
98 | /* | 100 | /* |
99 | * There is no specific formula for voltage to vsel | 101 | * There is no specific formula for voltage to vsel |
100 | * conversion above 1.3V. There are special hardcoded | 102 | * conversion above 1.3V. There are special hardcoded |
@@ -127,6 +129,8 @@ static u8 twl6030_uv_to_vsel(unsigned long uv) | |||
127 | is_offset_valid = true; | 129 | is_offset_valid = true; |
128 | } | 130 | } |
129 | 131 | ||
132 | if (!uv) | ||
133 | return 0x00; | ||
130 | /* | 134 | /* |
131 | * There is no specific formula for voltage to vsel | 135 | * There is no specific formula for voltage to vsel |
132 | * conversion above 1.3V. There are special hardcoded | 136 | * conversion above 1.3V. There are special hardcoded |