diff --git a/drivers/power/sgm4154x_chg_mmi/sgm4154x_charger.c b/drivers/power/sgm4154x_chg_mmi/sgm4154x_charger.c index 0b843a89a073..116118699835 100644 --- a/drivers/power/sgm4154x_chg_mmi/sgm4154x_charger.c +++ b/drivers/power/sgm4154x_chg_mmi/sgm4154x_charger.c @@ -3076,13 +3076,12 @@ static int sgm4154x_probe(struct i2c_client *client, i2c_set_clientdata(client, sgm); ret = sgm4154x_hw_chipid_detect(sgm); - if ((ret & SGM4154x_PN_MASK) != #ifdef __SGM41513_CHIP_ID__ - SGM4154x_PN_41513_ID + if ((ret & SGM4154x_PN_MASK) != SGM4154x_PN_41513_ID)){ + #else - SGM4154x_PN_41542_ID + if (((ret & SGM4154x_PN_MASK) != SGM4154x_PN_41542_ID) && ((ret & SGM4154x_PN_MASK) != SGM4154x_PN_41543D_ID)){ #endif - ){ pr_info("[%s] device not found !!!\n", __func__); return ret; } @@ -3242,6 +3241,7 @@ static const struct i2c_device_id sgm4154x_i2c_ids[] = { { "sgm41516", 0 }, { "sgm41516D", 0 }, { "sgm41513", 0 }, + { "sgm41543D", 0}, {}, }; MODULE_DEVICE_TABLE(i2c, sgm4154x_i2c_ids); @@ -3252,6 +3252,7 @@ static const struct of_device_id sgm4154x_of_match[] = { { .compatible = "sgm,sgm41516" }, { .compatible = "sgm,sgm41516D" }, { .compatible = "sgm,sgm41513" }, + { .compatible = "sgm,sgm41543D"}, { }, }; MODULE_DEVICE_TABLE(of, sgm4154x_of_match); diff --git a/drivers/power/sgm4154x_chg_mmi/sgm4154x_charger.h b/drivers/power/sgm4154x_chg_mmi/sgm4154x_charger.h index 960a4abbe18d..3da003eac4cd 100644 --- a/drivers/power/sgm4154x_chg_mmi/sgm4154x_charger.h +++ b/drivers/power/sgm4154x_chg_mmi/sgm4154x_charger.h @@ -88,6 +88,7 @@ #define SGM4154x_PN_41516_ID (BIT(6)| BIT(5)) #define SGM4154x_PN_41542_ID (BIT(6)| BIT(5)| BIT(3)) #define SGM4154x_PN_41516D_ID (BIT(6)| BIT(5)| BIT(3)) +#define SGM4154x_PN_41543D_ID (BIT(6)| BIT(3)) #define SGM4154x_PN_41513_ID 0 /* WDT TIMER SET */