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:
Xiaozhe Shi <xiaozhes@codeaurora.org>
Loading
Please register or sign in to comment