]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: bq24190_charger: Program charger with fwnode supplied ccc_ireg and...
authorHans de Goede <hdegoede@redhat.com>
Sun, 6 Feb 2022 18:35:41 +0000 (19:35 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Fri, 11 Feb 2022 18:08:34 +0000 (19:08 +0100)
commit98216ae4bdd4c0de279b915d6a5c52c5d679582d
treedb992aec95eafa895f72966bc6bff21de610a98b
parenta4d83ab7ca9725b1416c9c2d52b684f41aa0937c
power: supply: bq24190_charger: Program charger with fwnode supplied ccc_ireg and cvc_vreg

So far the bq24190_charger driver has been relying on either the chips
default constant_charge_current_max_ua and constant_charge_voltage_max_uv
values, or on the BIOS or bootloader to program these for us.

This does not happen on all boards, causing e.g. the wrong (too low)
values to be used on Lenovo Yoga Tablet 2 830F/L and 1050F/L tablets.

If power_supply_get_battery_info() provides us with values for these
settings, then program the charger accordingly.

And if the user later overrides these values then save the user-values
so that these will be restored after a suspend/resume.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/bq24190_charger.c