summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorRakesh Bodla <rbodla@nvidia.com>2014-06-19 16:57:44 +0530
committerRiham Haidar <rhaidar@nvidia.com>2014-06-23 22:50:41 -0700
commitf154ac8424e58dc7d814d8a536049772f6359e58 (patch)
tree7c31278aebea6bfbc98664160e22e17998f37baa /drivers/power
parent1a3af264730ab9185a55b118b6cf69e65de4ed94 (diff)
power: extcon: fix charging icon during bootup
If device is booted with charger cable, in probe y-cable extcon dev reports no cable is connected and cable connection status is getting corrupted. Fixing this by adding suitable condition. Bug 1522950 Change-Id: I5cee5953665338c500bf484ebc38cc5ce42c9ae0 Signed-off-by: Rakesh Bodla <rbodla@nvidia.com> Reviewed-on: http://git-master/r/425967 (cherry picked from commit 1e3be7bc384c4bd834729b216f137c7962e6dc36) Reviewed-on: http://git-master/r/426949 GVS: Gerrit_Virtual_Submit Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/power_supply_extcon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/power/power_supply_extcon.c b/drivers/power/power_supply_extcon.c
index 16156dc4a058..89a11cb75693 100644
--- a/drivers/power/power_supply_extcon.c
+++ b/drivers/power/power_supply_extcon.c
@@ -350,7 +350,8 @@ static int psy_extcon_probe(struct platform_device *pdev)
goto econ_err;
spin_lock(&psy_extcon->lock);
- power_supply_extcon_attach_cable(psy_extcon,
+ if (!psy_extcon->usb_online && !psy_extcon->ac_online)
+ power_supply_extcon_attach_cable(psy_extcon,
psy_extcon->y_cable_edev);
spin_unlock(&psy_extcon->lock);
}