• Linus Walleij's avatar
    power: supply: ab8500: Standardize capacity lookup · 0525f34d
    Linus Walleij authored
    The AB8500 charger only has one capacity table with
    unspecified temperature, so we assume this capacity is given
    for 20 degrees Celsius.
    
    Convert this table to use the OCV (open circuit voltage)
    tables in struct power_supply_battery_ocv_table.
    
    In the process, convert the fuel gauge driver to use
    microvolts and microamperes so we can use the same internals
    as the power supply subsystem without having to multiply
    and divide with 1000 in a few places.
    
    Also convert high_curr_threshold and lowbat_threshold to
    use microamperes and microvolts as these are closely
    related to these changes.
    
    Drop the unused overbat_threshold member in the custom
    struct ab8500_fg_parameters.
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
    0525f34d
ab8500_fg.c 82.2 KB