提交 2aed5b9e 编写于 作者: N Nishanth Menon 提交者: Kevin Hilman

OMAP4: PM: TWL6030: address 0V conversions

0V conversions should be mapped to 0 as it is meant to denote
off voltages.
Signed-off-by: NNishanth Menon <nm@ti.com>
上级 36649425
...@@ -95,6 +95,8 @@ static unsigned long twl6030_vsel_to_uv(const u8 vsel) ...@@ -95,6 +95,8 @@ static unsigned long twl6030_vsel_to_uv(const u8 vsel)
is_offset_valid = true; is_offset_valid = true;
} }
if (!vsel)
return 0;
/* /*
* There is no specific formula for voltage to vsel * There is no specific formula for voltage to vsel
* conversion above 1.3V. There are special hardcoded * conversion above 1.3V. There are special hardcoded
...@@ -127,6 +129,8 @@ static u8 twl6030_uv_to_vsel(unsigned long uv) ...@@ -127,6 +129,8 @@ static u8 twl6030_uv_to_vsel(unsigned long uv)
is_offset_valid = true; is_offset_valid = true;
} }
if (!uv)
return 0x00;
/* /*
* There is no specific formula for voltage to vsel * There is no specific formula for voltage to vsel
* conversion above 1.3V. There are special hardcoded * conversion above 1.3V. There are special hardcoded
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册