Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee837fb6 authored by Gustavo Solaira's avatar Gustavo Solaira
Browse files

esoc: Only force power off if the graceful shutdown fails



Force power off should only be used in case the graceful
shutdown fails otherwise the esoc will be resetted even
when not needed.

Change-Id: I2180e36a10bb325e55a8782554c71165fa7a6bee
Signed-off-by: default avatarGustavo Solaira <gustavos@codeaurora.org>
parent db005c45
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
/* Copyright (c) 2014-2015, 2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2015, 2017-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -230,10 +230,15 @@ static int mdm_cmd_exe(enum esoc_cmd cmd, struct esoc_clink *esoc)
			}
			msleep(100);
		}
		if (status_down)
		if (status_down) {
			dev_dbg(dev, "shutdown successful\n");
		else
			esoc_clink_queue_request(ESOC_REQ_SHUTDOWN, esoc);
		} else {
			dev_err(mdm->dev, "graceful poff ipc fail\n");
			graceful_shutdown = false;
			goto force_poff;
		}
		break;
force_poff:
	case ESOC_FORCE_PWR_OFF:
		if (!graceful_shutdown) {