mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
ignore optional dts property exist check result
Don't return error if dts property is optional with default value specified to allow probe continue. Change-Id: I74e3d948b380fd90c09d96308d3bb2990e438574 Signed-off-by: yanyh2 <yanyh2@motorola.com> Reviewed-on: https://gerrit.mot.com/2185351 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Jianqi Yang <yangj@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
501e4a44f1
commit
d4aeb6d6f2
1 changed files with 11 additions and 4 deletions
|
|
@ -2354,16 +2354,23 @@ static int bq_parse_dt(struct bq_fg_chip *bq)
|
|||
bq->name = bq->batt_name;
|
||||
|
||||
rc = of_property_read_string(node, "mmi,batt-profile-name", &bq->batt_profile_name);
|
||||
if (rc)
|
||||
if (rc) {
|
||||
mmi_fg_err(bq, "battery profile name is not specified in dts\n");
|
||||
bq->batt_profile_name = NULL;
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = of_property_read_u32(node, "design-capacity", &bq->batt_dc_conf);
|
||||
if (rc < 0)
|
||||
bq->batt_dc_conf = 0;;
|
||||
if (rc < 0) {
|
||||
bq->batt_dc_conf = 0;
|
||||
rc = 0;
|
||||
}
|
||||
|
||||
rc = of_property_read_u32(node, "mmi,temp-source", &bq->temp_source);
|
||||
if (rc < 0)
|
||||
if (rc < 0) {
|
||||
bq->temp_source = TEMP_SOURCE_EXTERNAL;
|
||||
rc = 0;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue