mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
charger:fix sgm4154x ID detected incorrect issue
After qcom rebase qc/Divar.LA.2.1.1-00014-STD.PROD-1, sgm4154x was always found even if there is no sgm4154x hardware IC. Need return if read sgm4154x ID failed. Change-Id: I08c39cb60de00addc32faee1ae945adb0cfc7053 Signed-off-by: Lei Chen <chenlei18@lenovo.com> Reviewed-on: https://gerrit.mot.com/2768596 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Wei Xu <xuwei9@lenovo.com> Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
7b4f1f5bce
commit
1904ea8aeb
1 changed files with 4 additions and 0 deletions
|
|
@ -3517,6 +3517,10 @@ static int sgm4154x_probe(struct i2c_client *client,
|
|||
i2c_set_clientdata(client, sgm);
|
||||
|
||||
ret = sgm4154x_hw_chipid_detect(sgm);
|
||||
if (ret < 0) {
|
||||
pr_info("[%s] device not found, ret = %d!!!\n", __func__, ret);
|
||||
return ret;
|
||||
}
|
||||
#ifdef __SGM41513_CHIP_ID__
|
||||
if ((ret & SGM4154x_PN_MASK) != SGM4154x_PN_41513_ID){
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue