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

Commit d928f051 authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy
Browse files

qcom: qpnp-fg-gen3: Reconfigure BMD during bootup



Booting up with higher battery id (e.g. 300KOhms) can cause a
failure in driver probe because none of the SRAM transactions
can go through during boot. This seems to be happening because
FG ALG treats it as a battery missing. Since driver fails to
probe early, it cannot even handle an interrupt to reconfigure
BMD. Hence, reconfigure BMD every time when the battery id is
obtained.

Since getting battery id now requires couple of SPMI writes,
move fg_get_batt_id() out of fg_get_batt_profile() as the latter
will be called from fg_parse_dt(). This makes fg_parse_dt() only
for parsing device tree properties from the device.

Change-Id: I1638f7325ce73b03f1ea54455f777f92cf8d06b3
Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent 9d27ab2f
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