power: smb349: correct charger status
authorAllen Yu <alleny@nvidia.com>
Wed, 8 Aug 2012 06:50:40 +0000 (14:50 +0800)
committerSimone Willett <swillett@nvidia.com>
Tue, 14 Aug 2012 03:47:32 +0000 (20:47 -0700)
commit71f038602f3417417aec99470fabb287ec8886fd
tree5d1567b09444c569a49d62ca93a2e1b342b82b78
parent665a0fee9dc497413bc702fbe86430c9248db8c8
power: smb349: correct charger status

When tegra-otg suspends with charger cable connected, the charger
state and type should not be changed, neither should the charger
callback be executed.

SMB349 has a debounce delay of ~20ms +/- 3 after cable is unpluged
and will stop all I2C functions for 2.3ms when getting reset to POR.
Add 50ms' delay before reading charger status to avoid I2C error and
make sure we get the right charger state.

Bug 1024735

Change-Id: I1667b23df768b46b524c6578c4bee09e131d9f96
Signed-off-by: Allen Yu <alleny@nvidia.com>
Reviewed-on: http://git-master/r/120905
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit
drivers/power/smb349-charger.c