All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFT] regulator: vexpress: Add missing n_voltages setting
@ 2012-10-17  3:26 Axel Lin
  2012-10-17 11:02 ` Pawel Moll
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-10-17  3:26 UTC (permalink / raw)
  To: Mark Brown; +Cc: Pawel Moll, Liam Girdwood, linux-kernel

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
Hi Pawel,
I don't have a chance to compile test this patch because I could not
find VEXPRESS_CONFIG in current tree.
Can you help testing this patch?

Thanks,
Axel
 drivers/regulator/vexpress.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/vexpress.c b/drivers/regulator/vexpress.c
index 1702945..94a8cb9 100644
--- a/drivers/regulator/vexpress.c
+++ b/drivers/regulator/vexpress.c
@@ -86,10 +86,14 @@ static int vexpress_regulator_probe(struct platform_device *pdev)
 	}
 
 	init_data->constraints.apply_uV = 0;
-	if (init_data->constraints.min_uV && init_data->constraints.max_uV)
+	if (init_data->constraints.min_uV && init_data->constraints.max_uV) {
 		reg->desc.ops = &vexpress_regulator_ops;
-	else
+		reg->desc.n_voltages = init_data->constraints.max_uV -
+				       init_data->constraints.min_uV + 1;
+	} else {
 		reg->desc.ops = &vexpress_regulator_ops_ro;
+		reg->desc.n_voltages = 1;
+	}
 
 	config.dev = &pdev->dev;
 	config.init_data = init_data;
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH RFT] regulator: vexpress: Add missing n_voltages setting
  2012-10-17  3:26 [PATCH RFT] regulator: vexpress: Add missing n_voltages setting Axel Lin
@ 2012-10-17 11:02 ` Pawel Moll
  0 siblings, 0 replies; 2+ messages in thread
From: Pawel Moll @ 2012-10-17 11:02 UTC (permalink / raw)
  To: Axel Lin; +Cc: Mark Brown, Liam Girdwood, linux-kernel

On Wed, 2012-10-17 at 04:26 +0100, Axel Lin wrote:
> I don't have a chance to compile test this patch because I could not
> find VEXPRESS_CONFIG in current tree.
> Can you help testing this patch?

I'll be more than happy to help, but can you please tell me what use
case you have in mind? The "reg->desc.continuous_voltage_range = true;"
together with this patch:

http://git.kernel.org/?p=linux/kernel/git/broonie/regulator.git;a=commitdiff;h=bd7a2b600ace90c8819495b639a744c8f5c68feb

were supposed to make the n_voltages unnecessary, as this regulator is
(in theory at least) capable of setting any voltage in the constraints
range, so there are not real operating points.

Cheers!

Paweł



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-17 11:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-17  3:26 [PATCH RFT] regulator: vexpress: Add missing n_voltages setting Axel Lin
2012-10-17 11:02 ` Pawel Moll

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.