]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: bq24190_charger: Disallow ccc_ireg and cvc_vreg to be higher then...
authorHans de Goede <hdegoede@redhat.com>
Sun, 6 Feb 2022 18:35:42 +0000 (19:35 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Fri, 11 Feb 2022 18:08:34 +0000 (19:08 +0100)
commit85e0f0b8c1aa1776c9635d75016cde5271626e4a
tree5178cd56f3288618cab6bfb0b13b4cb183af01bd
parent98216ae4bdd4c0de279b915d6a5c52c5d679582d
power: supply: bq24190_charger: Disallow ccc_ireg and cvc_vreg to be higher then the fwnode values

If the fwnode data as parsed by power_supply_get_battery_info() provides
max values for ccc_ireg and cvc_vreg then do not allow the user to later
set these to higher values then those specified by the firmware,
otherwise the battery might get damaged.

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