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

Commit 39d484be authored by Rishabh Bhatnagar's avatar Rishabh Bhatnagar
Browse files

esoc: Use BOOT mode indicating mdm2ap status high



Put modem in BOOT mode representing the state where mdm2ap
status has gone high but the efs pipe is not yet established.
Differenciating boot and run state helps handle error fatal
interrupts better.

Change-Id: Ifbc24468be67ba6f56a3dd2ca20e404949fb2ceb
Signed-off-by: default avatarRishabh Bhatnagar <rishabhb@codeaurora.org>
parent f4e9c336
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -556,6 +556,7 @@ static irqreturn_t mdm_status_change(int irq, void *dev_id)
		cancel_delayed_work(&mdm->mdm2ap_status_check_work);
		dev_dbg(dev, "status = 1: mdm is now ready\n");
		mdm->ready = true;
		esoc_clink_evt_notify(ESOC_BOOT_STATE, esoc);
		mdm_trigger_dbg(mdm);
		queue_work(mdm->mdm_queue, &mdm->mdm_status_work);
		if (mdm->get_restart_reason)
+7 −0
Original line number Diff line number Diff line
@@ -143,6 +143,13 @@ static void mdm_handle_clink_evt(enum esoc_evt evt,
		mdm_drv->pon_state = PON_FAIL;
		complete(&mdm_drv->pon_done);
		break;
	case ESOC_BOOT_STATE:
		if (mdm_drv->mode == PWR_OFF) {
			esoc_mdm_log(
			"ESOC_BOOT_STATE: Observed status high from modem.\n");
			mdm_drv->mode = BOOT;
		}
		break;
	case ESOC_RUN_STATE:
		esoc_mdm_log(
		"ESOC_RUN_STATE: Calling complete with state: PON_SUCCESS\n");
+2 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
 */
#ifndef _UAPI_ESOC_CTRL_H_
#define _UAPI_ESOC_CTRL_H_
@@ -57,6 +57,7 @@ enum esoc_evt {
	ESOC_CMD_ENG_OFF,
	ESOC_INVALID_STATE,
	ESOC_RETRY_PON_EVT,
	ESOC_BOOT_STATE,
};

enum esoc_cmd {