power: supply: bq24190: Considers FORCE_20PCT when getting IPRECHG
authorRicardo Rivera-Matos <rriveram@opensource.cirrus.com>
Fri, 14 Jul 2023 17:45:29 +0000 (12:45 -0500)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Wed, 19 Jul 2023 20:55:59 +0000 (22:55 +0200)
commitda28e18d6a31448a5f67e59e835669e930f8c044
treec9d14313e15253a435424decd5810396bafb16df
parent2ce8284c31156c432df60d4497ec68cca04e128f
power: supply: bq24190: Considers FORCE_20PCT when getting IPRECHG

Adds a check of the FORCE_20PCT bit when getting the precharge
current value.

According to the bit description for the FORCE_20PCT bit, when
FORCE_20PCT is true, the precharge current target is 50% of
what is configured in the IPRECHG bit field.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
Reviewed-by: David Rhodes <drhodes@opensource.cirrus.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/bq24190_charger.c