Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 3e3d3be7 authored by Rajendra Nayak's avatar Rajendra Nayak Committed by Liam Girdwood
Browse files

twl6030: regulator: Remove vsel tables and use formula for calculation



All twl6030 regulators can be programmed from 1.0v to 3.3v
with 100mV steps.
The below formula can be used to calculate the vsel values
to be programmed in the VREG_VOLTAGE registers.

Voltage(in mV) = 1000mv + 100mv * (vsel - 1)

Ex: if vsel = 0x9, mV = 1000 + 100 * (9 -1) = 1800mV.

This patch removes all existing VSEL tables for twl6030 adjustable
regulators and just uses the formula directly for vsel calculations
after verifing they fall in the allowed range.

Signed-off-by: default avatarRajendra Nayak <rnayak@ti.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 1dcc434b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment