regulator: da903x: Convert da9034 ldo12 to use linear ranges
authorAxel Lin <axel.lin@ingics.com>
Sun, 28 Jul 2013 08:37:23 +0000 (16:37 +0800)
committerMark Brown <broonie@linaro.org>
Sun, 28 Jul 2013 12:41:52 +0000 (13:41 +0100)
commit550bf89366e068cd6e29c36156f700a02dbb6388
tree97e02e8e3760b5cd8487bc91db0512f8ab2cdc76
parent6c918d220925eeeca75b67e896eabffd061cd128
regulator: da903x: Convert da9034 ldo12 to use linear ranges

The voltage table of da9034 LDO12 is:
1700000, 1750000, 1800000, 1850000, 1900000, 1950000, 2000000, 2050000
2700000, 2750000, 2800000, 2850000, 2900000, 2950000, 3000000, 3050000

The voltage table is composed of two linear ranges:
for selector 0 ... 7:
        volt = 1700000 + 50000 * selector
for selector: 8 ... 15:
        volt = 2700000 + 50000 * (selector - 8)

This patch converts da9034 LDO12 to use newly introduced helpers for multiple
linear ranges.

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