diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-08-30 10:06:06 (GMT) |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-30 14:26:03 (GMT) |
commit | 6290d60656e9f4f5a0071bafa798370ab35978a0 (patch) | |
tree | bb88564dc6590b846d7099dae930befe933bcb19 /include/linux/regulator/fan53555.h | |
parent | 550bf89366e068cd6e29c36156f700a02dbb6388 (diff) | |
download | linux-fsl-qoriq-6290d60656e9f4f5a0071bafa798370ab35978a0.tar.xz |
regulator: tps65217: Convert to use linear ranges
Below is the equation in original code:
tps65217_uv1_ranges:
0 ... 24: uV = vsel * 25000 + 900000;
25 ... 52: uV = (vsel - 24) * 50000 + 1500000;
= (vsel - 25) * 50000 + 1550000;
53 ... 55: uV = (vsel - 52) * 100000 + 2900000;
= (vsel - 53) * 100000 + 3000000;
56 ... 62: uV = 3300000;
tps65217_uv2_ranges:
0 ... 8: uV = vsel * 50000 + 1500000;
9 ... 13: uV = (vsel - 8) * 100000 + 1900000;
= (vsel - 9) * 100000 + 2000000;
14 ... 31: uV = (vsel - 13) * 50000 + 2400000;
= (vsel - 14) * 50000 + 2450000;
The voltage tables are composed of linear ranges.
This patch converts this driver to use multiple linear ranges APIs.
In original code, voltage range for DCDC1 is 900000 ~ 1800000 and voltage range
for DCDC3 is 900000 ~ 1500000. This patch separates the range 25~52 in
tps65217_uv1_ranges table to two linear ranges: 25~30 and 31~52.
This change makes it possible to reuse the same linear_ranges table for DCDCx.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/linux/regulator/fan53555.h')
0 files changed, 0 insertions, 0 deletions