From: James Wylder Date: Mon, 10 Jan 2011 21:23:26 +0000 (-0600) Subject: mdm6600_ctrl: Hold down pwron pin until acknowledged by modem X-Git-Tag: firefly_0821_release~9834^2~191 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=142b2f4d286e9e25a1544bb7ec8178cf985da6ba;p=firefly-linux-kernel-4.4.55.git mdm6600_ctrl: Hold down pwron pin until acknowledged by modem This ensures that the modem powers down correctly and is part of the fix required to ensure that the BP powers up correctly after reflash / over the air update. Change-Id: Ied6a1fe2213127c944547ac2ed86abaf0eb63bd2 Signed-off-by: James Wylder --- diff --git a/drivers/misc/mdm6600_ctrl.c b/drivers/misc/mdm6600_ctrl.c index 85b9c391cb5b..7eb2a688a463 100644 --- a/drivers/misc/mdm6600_ctrl.c +++ b/drivers/misc/mdm6600_ctrl.c @@ -604,17 +604,17 @@ static void __devexit mdm_ctrl_shutdown(struct platform_device *pdev) msleep(100); pr_info("%s: ap_status set to %d", mdmctrl, get_ap_status()); - /* Toggle the power, delaying to allow modem to respond */ + /* Assert PWRON to tell modem to shutdown and leave pin asserted */ + /* until acknowledged or wait times out */ set_bp_pwron(1); msleep(100); - set_bp_pwron(0); - msleep(100); /* This should be enough to power down the modem */ /* if this doesn't work, reset the modem and try */ /* one more time, ultimately the modem will be */ /* hard powered off */ pd_failure = bp_shutdown_wait(5); + set_bp_pwron(0); if (pd_failure) { pr_info("%s: Resetting unresponsive modem.", mdmctrl); set_bp_resin(1);