* [PATCH V1] regulator: tps65910: Correct VIO voltage configuration
@ 2012-02-17 13:26 Laxman Dewangan
2012-02-17 16:35 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Laxman Dewangan @ 2012-02-17 13:26 UTC (permalink / raw)
To: broonie, lrg, linux-kernel; +Cc: linux-tegra, ldewangan
The VIO regulator register specify the voltage configuration
on bit3:2 of its register. And hence only these bits should
be modified when setting voltage and used when reading voltage
from register setting.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
drivers/regulator/tps65910-regulator.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c
index 9092b7f..a9bb6d4 100644
--- a/drivers/regulator/tps65910-regulator.c
+++ b/drivers/regulator/tps65910-regulator.c
@@ -674,8 +674,9 @@ static int tps65911_get_voltage(struct regulator_dev *dev)
step_mv = 100;
break;
case TPS65910_REG_VIO:
+ value &= LDO_SEL_MASK;
+ value >>= LDO_SEL_SHIFT;
return pmic->info[id]->voltage_table[value] * 1000;
- break;
default:
return -EINVAL;
}
@@ -767,9 +768,11 @@ static int tps65911_set_voltage(struct regulator_dev *dev, unsigned selector)
case TPS65911_REG_LDO6:
case TPS65911_REG_LDO7:
case TPS65911_REG_LDO8:
- case TPS65910_REG_VIO:
return tps65910_modify_bits(pmic, reg,
(selector << LDO_SEL_SHIFT), LDO3_SEL_MASK);
+ case TPS65910_REG_VIO:
+ return tps65910_modify_bits(pmic, reg,
+ (selector << LDO_SEL_SHIFT), LDO_SEL_MASK);
}
return -EINVAL;
--
1.7.1.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH V1] regulator: tps65910: Correct VIO voltage configuration
2012-02-17 13:26 [PATCH V1] regulator: tps65910: Correct VIO voltage configuration Laxman Dewangan
@ 2012-02-17 16:35 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-02-17 16:35 UTC (permalink / raw)
To: Laxman Dewangan; +Cc: lrg, linux-kernel, linux-tegra
[-- Attachment #1: Type: text/plain, Size: 298 bytes --]
On Fri, Feb 17, 2012 at 06:56:11PM +0530, Laxman Dewangan wrote:
> The VIO regulator register specify the voltage configuration
> on bit3:2 of its register. And hence only these bits should
> be modified when setting voltage and used when reading voltage
> from register setting.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-17 16:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-17 13:26 [PATCH V1] regulator: tps65910: Correct VIO voltage configuration Laxman Dewangan
2012-02-17 16:35 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox