From: Liam Breck Date: Wed, 18 Jan 2017 17:26:49 +0000 (-0800) Subject: power: supply: bq24190_charger: Call set_mode_host() on pm_resume() X-Git-Tag: release-20171130_firefly~4^2~100^2~1^2~9^2~53 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=760d62e94017b55368a0905f36d47c5035c83b84;p=firefly-linux-kernel-4.4.55.git power: supply: bq24190_charger: Call set_mode_host() on pm_resume() 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 Acked-by: Mark Greer Acked-by: Tony Lindgren Signed-off-by: Sebastian Reichel Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/power/bq24190_charger.c b/drivers/power/bq24190_charger.c index 694c088e6f95..089485a290af 100644 --- a/drivers/power/bq24190_charger.c +++ b/drivers/power/bq24190_charger.c @@ -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 */