power: supply: bq24190_charger: Call set_mode_host() on pm_resume()
authorLiam Breck <liam@networkimprov.net>
Wed, 18 Jan 2017 17:26:49 +0000 (09:26 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 14 May 2017 11:32:54 +0000 (13:32 +0200)
commit e05ad7e0741ce0505e1df157c62b22b95172bb97 upstream.

pm_resume() does a register_reset() which clears charger host mode.

Fix by calling set_mode_host() after the reset.

Fixes: d7bf353fd0aa3 ("bq24190_charger: Add support for TI BQ24190 Battery Charger")
Signed-off-by: Liam Breck <kernel@networkimprov.net>
Acked-by: Mark Greer <mgreer@animalcreek.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/power/bq24190_charger.c

index 694c088e6f95e8a32cd342bf28809f3cdd3620de..089485a290af8f27a62b53153ffb787cae62b61b 100644 (file)
@@ -1494,6 +1494,7 @@ static int bq24190_pm_resume(struct device *dev)
 
        pm_runtime_get_sync(bdi->dev);
        bq24190_register_reset(bdi);
+       bq24190_set_mode_host(bdi);
        pm_runtime_put_sync(bdi->dev);
 
        /* Things may have changed while suspended so alert upper layer */