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

Commit 4018bcbb authored by Sujeev Dias's avatar Sujeev Dias
Browse files

mhi: core: notify clients whenever device flow control status changes



MHI clients needs notification immediately when device flow control
status (DTR, RTS) changes.

CRs-Fixed: 2466740
Change-Id: Ifecded159fd7936f4d265d65e9c2c16c32c7b19c
Signed-off-by: default avatarSujeev Dias <sdias@codeaurora.org>
parent 3236b8ea
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2018, The Linux Foundation. All rights reserved.*/
/* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.*/

#include <linux/debugfs.h>
#include <linux/device.h>
@@ -164,6 +164,9 @@ static void mhi_dtr_dl_xfer_cb(struct mhi_device *mhi_dev,
	if (dtr_msg->msg & CTRL_MSG_RI)
		mhi_dev->tiocm |= TIOCM_RI;
	spin_unlock_irq(res_lock);

	/* Notify the update */
	mhi_notify(mhi_dev, MHI_CB_DTR_SIGNAL);
}

static void mhi_dtr_ul_xfer_cb(struct mhi_device *mhi_dev,
+1 −0
Original line number Diff line number Diff line
@@ -2479,6 +2479,7 @@ static void ipa_mpm_mhi_status_cb(struct mhi_device *mhi_dev,
	case MHI_CB_FATAL_ERROR:
	case MHI_CB_BW_REQ:
	case MHI_CB_EE_MISSION_MODE:
	case MHI_CB_DTR_SIGNAL:
		IPA_MPM_ERR("unexpected event %d\n", mhi_cb);
		break;
	}
+2 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ struct mhi_buf_info;
 * enum MHI_CB - MHI callback
 * @MHI_CB_IDLE: MHI entered idle state
 * @MHI_CB_PENDING_DATA: New data available for client to process
 * @MHI_CB_DTR_SIGNAL: DTR signaling update
 * @MHI_CB_LPM_ENTER: MHI host entered low power mode
 * @MHI_CB_LPM_EXIT: MHI host about to exit low power mode
 * @MHI_CB_EE_RDDM: MHI device entered RDDM execution enviornment
@@ -28,6 +29,7 @@ struct mhi_buf_info;
enum MHI_CB {
	MHI_CB_IDLE,
	MHI_CB_PENDING_DATA,
	MHI_CB_DTR_SIGNAL,
	MHI_CB_LPM_ENTER,
	MHI_CB_LPM_EXIT,
	MHI_CB_EE_RDDM,