diff options
Diffstat (limited to 'drivers/power/pm2301_charger.c')
-rw-r--r-- | drivers/power/pm2301_charger.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/power/pm2301_charger.c b/drivers/power/pm2301_charger.c index b560fa5ac4e7..45ef3b9de6b9 100644 --- a/drivers/power/pm2301_charger.c +++ b/drivers/power/pm2301_charger.c | |||
@@ -1059,6 +1059,13 @@ static int pm2xxx_wall_charger_probe(struct i2c_client *i2c_client, | |||
1059 | ret = pm2xxx_charger_detection(pm2, &val); | 1059 | ret = pm2xxx_charger_detection(pm2, &val); |
1060 | 1060 | ||
1061 | if ((ret == 0) && val) { | 1061 | if ((ret == 0) && val) { |
1062 | /* | ||
1063 | * When boot is due to AC charger plug-in, | ||
1064 | * read interrupt registers | ||
1065 | */ | ||
1066 | pm2xxx_reg_read(pm2, PM2XXX_REG_INT1, &val); | ||
1067 | pm2xxx_reg_read(pm2, PM2XXX_REG_INT2, &val); | ||
1068 | pm2xxx_reg_read(pm2, PM2XXX_REG_INT4, &val); | ||
1062 | pm2->ac.charger_connected = 1; | 1069 | pm2->ac.charger_connected = 1; |
1063 | pm2->ac_conn = true; | 1070 | pm2->ac_conn = true; |
1064 | power_supply_changed(&pm2->ac_chg.psy); | 1071 | power_supply_changed(&pm2->ac_chg.psy); |