mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
sgm4154x:Bring up charger IC SGM41543D
Rhode4G use SGM41543D as the 2nd charger IC. Bring up charger IC SGM41543D. Change-Id: Id1eb726b311d1f415942bb15508272a221bd686b Signed-off-by: Lei Chen <chenlei18@lenovo.com> Reviewed-on: https://gerrit.mot.com/2238618 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Reviewed-by: Wei Xu <xuwei9@lenovo.com> Reviewed-by: Haijian Ma <mahj8@motorola.com> Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com> Reviewed-by: Qiong Xie <xieq2@motorola.com> Tested-by: Jira Key Submit-Approved: Jira Key
This commit is contained in:
parent
a5a4c92319
commit
30a84ca859
2 changed files with 6 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue