Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2b1e1d83 authored by Xiaozhe Shi's avatar Xiaozhe Shi
Browse files

power: qpnp-smbcharger: fix charging enable



Currently, the charger driver does not check whether or not the
charge_enable command bit is set during its initialization. If charging
was disabled in the bootloader, then charging may not start at all
after it boots into Linux.

Fix this by always enabling charging during smbchg_hw_init().

Furthermore, change the confusing CHG_EN_COMMAND_BIT define to
CHG_EN_POLARITY_BIT so that it accurately reflects that the bit controls
the charge enable polarity.

Finally, remove an old workaround that makes smbchg_hw_init() sleep for
20ms when waiting for charging to start/stop.

CRs-Fixed: 867782
Change-Id: Iee555dc1e8af3a6e00681e81f2398ebd820cbc40
Signed-off-by: default avatarXiaozhe Shi <xiaozhes@codeaurora.org>
parent 630fdcc6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment