]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
power: supply: bq24190: Fix BQ24296 Vbus regulator support
authorHans de Goede <hdegoede@redhat.com>
Sat, 16 Nov 2024 20:36:47 +0000 (21:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Jan 2025 09:34:15 +0000 (10:34 +0100)
commit155829fd1e1d18cdd0f4cb808a8566a2f65bafd5
treea86cac738eea17a8cf3232d8c2019e41bb5b23f9
parent6d9cd27105459f169993a4c5f216499a946dbf34
power: supply: bq24190: Fix BQ24296 Vbus regulator support

[ Upstream commit b3ded6072c5600704cfa3ce3a8dc8718d34bda66 ]

There are 2 issues with bq24296_set_otg_vbus():

1. When writing the OTG_CONFIG bit it uses POC_CHG_CONFIG_SHIFT which
   should be POC_OTG_CONFIG_SHIFT.

2. When turning the regulator off it never turns charging back on. Note
   this must be done through bq24190_charger_set_charge_type(), to ensure
   that the charge_type property value of none/trickle/fast is honored.

Resolve both issues to fix BQ24296 Vbus regulator support not working.

Fixes: b150a703b56f ("power: supply: bq24190_charger: Add support for BQ24296")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20241116203648.169100-2-hdegoede@redhat.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/power/supply/bq24190_charger.c