]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: tps65912: Convert tps65912_ops_ldo to use linear ranges
authorAxel Lin <axel.lin@ingics.com>
Sat, 20 Jul 2013 08:56:45 +0000 (16:56 +0800)
committerMark Brown <broonie@linaro.org>
Wed, 24 Jul 2013 14:48:01 +0000 (15:48 +0100)
commit17cc8db1a7538ef43ad618587e775e679d992869
treefff010b0b836991fbaa62a81ec0e6bab49f082b3
parenta3079e9139cd68a2ce172277272f72e0aa13bdb1
regulator: tps65912: Convert tps65912_ops_ldo to use linear ranges

The ldo voltage table is composed of linear ranges.

Below is the equation in original code (tps65912_vsel_to_uv_ldo):
0 ... 32:      uv = vsel * 25000 + 800000;
33 ... 60:     uv = (vsel - 32) * 50000 + 1600000;
                  = (vsel -33) * 50000 + 1650000;
61 ...63:      uv = (vsel - 60) * 100000 + 3000000;
                  = (vsel - 61) * 100000 + 3100000;

This patch converts tps65912_ops_ldo to use multiple linear ranges APIs.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/tps65912-regulator.c