regulator: vexpress: Add missing n_voltages setting
PATCH 1/1 regulator: vexpress: Add missing n_voltages setting
Signed-off-by Axel Lin <[email protected]>
---
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(-)
drivers/regulator/vexpress.c +6 -2
@@ -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;
Signature · 1 line
1.7.9.5
Quoted 3 lines · Axel Lin
I don't have a chance to compile test this patch because I could not find
VEXPRESS_CONFIGin 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:
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ł