• Hans de Goede's avatar
    power: supply: bq25890: Add new linux,iinlim-percentage property · 6adaa9a4
    Hans de Goede authored
    Some devices, such as the Lenovo Yoga Tab 3 Pro (YT3-X90F) have
    multiple batteries with a separate bq25890 charger for each battery.
    
    This requires the maximum current the external power-supply can deliver
    to be divided over the chargers. The Android vendor kernel shipped
    on the YT3-X90F divides this current with a 40/60 percent split so that
    batteries are done charging at approx. the same time if both were fully
    empty at the start.
    
    Add support for a new "linux,iinlim-percentage" percentage property which
    can be set to indicate that a bq25890 charger should only use that
    percentage of the external power-supply's maximum current.
    
    So far this new property is only used on x86/ACPI (non devicetree) devs,
    IOW it is not used in actual devicetree files. The devicetree-bindings
    maintainers have requested properties like these to not be added to the
    devicetree-bindings, so the new property is deliberately not added
    to the existing devicetree-bindings.
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    Reviewed-by: default avatarMarek Vasut <marex@denx.de>
    Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
    6adaa9a4
bq25890_charger.c 43.3 KB