mdm6600_ctrl: Hold down pwron pin until acknowledged by modem
authorJames Wylder <james.wylder@motorola.com>
Mon, 10 Jan 2011 21:23:26 +0000 (15:23 -0600)
committerBenoit Goby <benoit@android.com>
Mon, 10 Jan 2011 23:13:44 +0000 (15:13 -0800)
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 <james.wylder@motorola.com>
drivers/misc/mdm6600_ctrl.c

index 85b9c391cb5bd9a4ed628b31c3638e6b7db5c98b..7eb2a688a4639683a88dcf0ae9d9576b66e343bf 100644 (file)
@@ -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);