• Linus Walleij's avatar
    power: supply: ab8500: Standardize operating temperature · 6252c706
    Linus Walleij authored
    Instead of storing the temperature limits in our custom
    struct struct ab8500_bm_data, make struct power_supply_battery_info
    a member of this and store the min and max temperatures inside
    that struct as the temp_min/temp_max and
    temp_alert_min/temp_alert_max respectively.
    
    The values can be assigned from the device tree, but if
    not present will be set to the same defaults as are currently
    in the code.
    
    This way we start to move over to using
    struct power_supply_battery_info and make it possible to move
    the data over to the device tree and we will move piece by
    piece toward using the standard info struct.
    
    Temperature hysteresis is currently not supported by the
    standard struct but we move the assignment here as well so
    that we have all parameterization in one spot.
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
    6252c706
ab8500_chargalg.c 58.5 KB