charger: smb345: hold 2s tiemout wakelock during resume

The system resume then suspend too fast
when put on or remove wireless charging dock

Change-Id: Idddb823036b58f1c390aee500574d8379a91731f
Signed-off-by: Hank_Lee <Hank_Lee@asus.com>
This commit is contained in:
Hank_Lee 2013-06-14 20:48:19 +08:00 committed by Iliyan Malchev
parent 64a8a0038e
commit 35b0d3174f

View file

@ -1248,6 +1248,10 @@ static int smb345_suspend(struct i2c_client *client, pm_message_t mesg)
static int smb345_resume(struct i2c_client *client)
{
printk("smb345_resume+\n");
if (wireless_on != !(gpio_get_value(charger->wpc_pok_gpio)))
wake_lock_timeout(&charger_wakelock, 2*HZ);
printk("smb345_resume-\n");
return 0;
}