sgm41513:add sgm41513 chipid detect,

add the chipid detection
for sgm41513

Change-Id: I2a6bdb4beda2b206eba9c8cf82b2c3ff238005dd
Signed-off-by: xieqiong2 <xieqiong2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2221261
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
This commit is contained in:
xieqiong2 2022-03-21 13:49:47 +08:00 • committed by Qiong Xie
commit be3efde153

View file

@ -2968,9 +2968,15 @@ static int sgm4154x_probe(struct i2c_client *client,
i2c_set_clientdata(client, sgm);
ret = sgm4154x_hw_chipid_detect(sgm);
if ((ret & SGM4154x_PN_MASK) != SGM4154x_PN_41542_ID){
if ((ret & SGM4154x_PN_MASK) !=
#ifdef __SGM41513_CHIP_ID__
SGM4154x_PN_41513_ID
#else
SGM4154x_PN_41542_ID
#endif
){
pr_info("[%s] device not found !!!\n", __func__);
//return ret;
return ret;
}
sema_init(&sgm->sem_dpdm, 1);