Skip to content

Commit

Permalink
power: supply: qcom: Make batterydata profile devices specific
Browse files Browse the repository at this point in the history
Signed-off-by: Shashank Patil <[email protected]>
  • Loading branch information
itsshashanksp committed Jul 3, 2024
1 parent 4dca53d commit fc208fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/power/supply/qcom/qpnp-qg.c
Original file line number Diff line number Diff line change
Expand Up @@ -3622,16 +3622,19 @@ static int qg_load_battery_profile(struct qpnp_qg *chip)
return rc;
}
#endif

#ifdef CONFIG_K6_CHARGE
pr_err("is_batt_vendor_swd is %d\n", is_batt_vendor_swd);
profile_node = of_batterydata_get_best_profile(chip->batt_node,
chip->batt_id_ohm / 1000, "K6_sunwoda_5020mah");

#else
rc = of_property_read_string(profile_node, "qcom,battery-type",
&chip->bp.batt_type_str);
if (rc < 0) {
pr_err("Failed to detect battery type rc:%d\n", rc);
return rc;
}
#endif

#ifdef CONFIG_BATT_VERIFY_BY_DS28E16
if (!chip->dt.qg_page0_unused) {
Expand Down

0 comments on commit fc208fe

Please sign in to comment.