power: qpnp-fg-gen3: Handle status change only after SOC is ready
Currently, SW can start handling status_change from other power supplies viz. battery/parallel/usb as soon as the driver is probed. But in some cases like device is booting up with the charger connected, this can cause some of the SW algorithms not to start correctly as the charging status got updated before they are ready. Later when the algorithms are supposed to run, they cannot start as the signal based on charging status is missed. Fix this by skipping doing anything in status_change_work until the profile_load_work is complete and schedule status_change_work after profile_load_work is complete. While at it, start showing 50% if SOC is not ready. CRs-Fixed: 2147343 Change-Id: Ib0a9f95d5a9a71f03d7a6c5f7ab36a8118a904ca Signed-off-by:Subbaraman Narayanamurthy <subbaram@codeaurora.org> Signed-off-by:
Anirudh Ghayal <aghayal@codeaurora.org>
Loading
Please register or sign in to comment