power: supply: bq25890: Add support for setting user charge current and voltage limit
authorMarek Vasut <marex@denx.de>
Fri, 14 Oct 2022 17:24:24 +0000 (19:24 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Fri, 28 Oct 2022 23:40:31 +0000 (01:40 +0200)
commitb63e60ebb3fb071a96667307b1e129ccac76ce6b
tree48693bb1aa6cd0f0a276c24e6f04651374e72a35
parent7c85237519738ca4808b4fa79c2d448770f8d33f
power: supply: bq25890: Add support for setting user charge current and voltage limit

Let user set battery charge current and voltage limit via sysfs. This is
useful in case the user space needs to reduce charge current to keep the
system within thermal limits. The maximum charge current and voltage are
still limited to "ti,charge-current" and "ti,battery-regulation-voltage"
values to avoid damaging the hardware in case too high values are set by
user space.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/bq25890_charger.c