* [PATCH] regulator: max8907: Fix n_voltages for MAX8907B SD1
@ 2012-08-16 4:26 Axel Lin
2012-08-16 16:06 ` Stephen Warren
2012-08-17 22:01 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2012-08-16 4:26 UTC (permalink / raw)
To: Mark Brown
Cc: Liam Girdwood, linux-kernel, Gyungoh Yoo, Stephen Warren,
Laxman Dewangan
For linear voltage mapping, the n_voltages is (max - min) / step + 1
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/regulator/max8907-regulator.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/max8907-regulator.c b/drivers/regulator/max8907-regulator.c
index bd3b28b..bdf21a1 100644
--- a/drivers/regulator/max8907-regulator.c
+++ b/drivers/regulator/max8907-regulator.c
@@ -286,7 +286,8 @@ static __devinit int max8907_regulator_probe(struct platform_device *pdev)
MAX8907_II2RR_VERSION_REV_B) {
pmic->desc[MAX8907_SD1].min_uV = 637500;
pmic->desc[MAX8907_SD1].uV_step = 12500;
- pmic->desc[MAX8907_SD1].n_voltages = (1425000 - 637500) / 12500;
+ pmic->desc[MAX8907_SD1].n_voltages =
+ (1425000 - 637500) / 12500 + 1;
}
for (i = 0; i < MAX8907_NUM_REGULATORS; i++) {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] regulator: max8907: Fix n_voltages for MAX8907B SD1
2012-08-16 4:26 [PATCH] regulator: max8907: Fix n_voltages for MAX8907B SD1 Axel Lin
@ 2012-08-16 16:06 ` Stephen Warren
2012-08-17 22:01 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Warren @ 2012-08-16 16:06 UTC (permalink / raw)
To: Axel Lin
Cc: Mark Brown, Liam Girdwood, linux-kernel, Gyungoh Yoo,
Stephen Warren, Laxman Dewangan
On 08/15/2012 10:26 PM, Axel Lin wrote:
> For linear voltage mapping, the n_voltages is (max - min) / step + 1
Oh yes:-(
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] regulator: max8907: Fix n_voltages for MAX8907B SD1
2012-08-16 4:26 [PATCH] regulator: max8907: Fix n_voltages for MAX8907B SD1 Axel Lin
2012-08-16 16:06 ` Stephen Warren
@ 2012-08-17 22:01 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2012-08-17 22:01 UTC (permalink / raw)
To: Axel Lin
Cc: Liam Girdwood, linux-kernel, Gyungoh Yoo, Stephen Warren,
Laxman Dewangan
On Thu, Aug 16, 2012 at 12:26:02PM +0800, Axel Lin wrote:
> For linear voltage mapping, the n_voltages is (max - min) / step + 1
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-08-17 22:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-16 4:26 [PATCH] regulator: max8907: Fix n_voltages for MAX8907B SD1 Axel Lin
2012-08-16 16:06 ` Stephen Warren
2012-08-17 22:01 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).