From 64be2a9e1fdc4421cefb4f5ab89910c511f390dd Mon Sep 17 00:00:00 2001 From: Pavan Kumar S Date: Thu, 7 Jun 2012 14:57:29 +0530 Subject: [PATCH] smb347_charger: Add a small delay after OTG-disable. BZ: 39775 When OTG disabled and charging enabled, send the uevent after a short delay, as Status Register C is not updated immediately. Change-Id: I24160a7a5f9350aa50ca5dbad6af5b0c23a4188b Signed-off-by: Pavan Kumar S Reviewed-on: http://android.intel.com:8080/51924 Reviewed-by: Tc, Jenny Reviewed-by: Jena, TapanX Tested-by: Kallappa Manjanna, MadhukumarX Reviewed-by: buildbot Tested-by: buildbot --- drivers/power/smb347-charger.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/power/smb347-charger.c b/drivers/power/smb347-charger.c index 0a8ebeb..e87187e 100644 --- a/drivers/power/smb347-charger.c +++ b/drivers/power/smb347-charger.c @@ -593,6 +593,11 @@ static void smb347_otg_drive_vbus(struct smb347_charger *smb, bool enable) if (smb347_is_online(smb)) { smb347_charging_enable(smb); smb->otg_battery_uv = false; + /* Small delay-interval(10-11ms) for + * STAT-C to be updated + */ + usleep_range(10000, 11000); + if (smb->pdata->use_mains) power_supply_changed(&smb->mains); if (smb->pdata->use_usb) -- 2.7.4