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

Commit dafa5317 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 2e2685a9 4018bcbb
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
@@ -2420,6 +2420,7 @@ static void ipa_mpm_mhi_status_cb(struct mhi_device *mhi_dev,
	case MHI_CB_SYS_ERROR:
	case MHI_CB_FATAL_ERROR:
	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
@@ -27,6 +28,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,