summaryrefslogtreecommitdiff
path: root/drivers/regulator/vctrl-regulator.c
AgeCommit message (Collapse)AuthorFilesLines
2017-04-14regulator: vctrl: Fix out of bounds array access for vctrl->vtableAxel Lin1-4/+4
Current code only allocates rdesc->n_voltages entries for vctrl->vtable. Thus use rdesc->n_voltages instead of n_voltages in the for loop. While at it, also switch to use devm_kcalloc instead of devm_kmalloc_array + __GFP_ZERO flag and fix the argument order. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-10regulator: Add driver for voltage controlled regulatorsMatthias Kaehlcke1-0/+546
The output voltage of a voltage controlled regulator can be controlled through the voltage of another regulator. The current version of this driver assumes that the output voltage is a linear function of the control voltage. Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>