]> git.karo-electronics.de Git - linux-beck.git/commitdiff
pm2301-charger: Force main charger detect
authorPer Forlin <per.forlin@stericsson.com>
Thu, 5 Jul 2012 14:52:55 +0000 (16:52 +0200)
committerLee Jones <lee.jones@linaro.org>
Thu, 7 Mar 2013 04:35:40 +0000 (12:35 +0800)
Force main charger detect in turn on status.

Signed-off-by: Rajkumar Kasirajan <rajkumar.kasirajan@stericsson.com>
Signed-off-by: Per Forlin <per.forlin@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Tested-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
drivers/power/pm2301_charger.c

index 45ef3b9de6b909a2e51ac9987b77571387adc7a0..3f02636c48a525e01818485e8b4cd1419ffdb340 100644 (file)
@@ -1067,6 +1067,8 @@ static int pm2xxx_wall_charger_probe(struct i2c_client *i2c_client,
                pm2xxx_reg_read(pm2, PM2XXX_REG_INT2, &val);
                pm2xxx_reg_read(pm2, PM2XXX_REG_INT4, &val);
                pm2->ac.charger_connected = 1;
+               ab8500_override_turn_on_stat(~AB8500_POW_KEY_1_ON,
+                                            AB8500_MAIN_CH_DET);
                pm2->ac_conn = true;
                power_supply_changed(&pm2->ac_chg.psy);
                sysfs_notify(&pm2->ac_chg.psy.dev->kobj, NULL, "present");