Commit Graph
2 Commits
Author SHA1 Message Date
Axel Lin a9bbb453b5 regulator: vctrl: Fix out of bounds array access for vctrl->vtable
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2017-04-14 18:01:03 +01:00
Matthias Kaehlcke 9dee7a72d0 regulator: Add driver for voltage controlled regulators
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 <[email protected]>
Acked-by: Rob Herring <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2017-04-10 17:30:40 +01:00