power: supply: smb347-charger: Add missing pin control activation
authorDmitry Osipenko <digetx@gmail.com>
Sat, 31 Jul 2021 17:38:38 +0000 (20:38 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Sep 2021 07:50:25 +0000 (09:50 +0200)
commit5d59f38c6ba546caca5e3ae815edd6bea4dae503
treed9bc680e94482203535ebaeb8e01c73b060f51ad
parent10e759e350d7c5078cdd6497e410585434d02c22
power: supply: smb347-charger: Add missing pin control activation

[ Upstream commit efe2175478d5237949e33c84d9a722fc084b218c ]

Pin control needs to be activated by setting the enable bit, otherwise
hardware rejects all pin changes. Previously this stayed unnoticed on
Nexus 7 because pin control was enabled by default after rebooting from
downstream kernel, which uses driver that enables the bit and charger
registers are non-volatile until power supply (battery) is disconnected.
Configure the pin control enable bit. This fixes the potentially
never-enabled charging on devices that use pin control.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/power/supply/smb347-charger.c