Skip to content

Commit

Permalink
OMAP4: PM: TWL6030: address 0V conversions
Browse files Browse the repository at this point in the history
0V conversions should be mapped to 0 as it is meant to denote
off voltages.

Signed-off-by: Nishanth Menon <nm@ti.com>
  • Loading branch information
Nishanth Menon authored and Kevin Hilman committed Sep 15, 2011
1 parent 3664942 commit 2aed5b9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/arm/mach-omap2/omap_twl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2aed5b9

Please sign in to comment.