• Axel Lin's avatar
    regulator: da903x: Convert da9034 ldo12 to use linear ranges · 550bf893
    Axel Lin authored
    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: default avatarAxel Lin <axel.lin@ingics.com>
    Signed-off-by: default avatarMark Brown <broonie@linaro.org>
    550bf893
da903x.c 15.1 KB