From b456598ae4d3367c3b675a7554eb29dce547baf4 Mon Sep 17 00:00:00 2001 From: Bhaumik Bhatt Date: Wed, 24 Jun 2020 13:16:16 -0700 Subject: [PATCH] mhi: core: Expose API to check device execution environment Expose an API for clients to check the device execution environment by reading the BHI_EXECENV register. This can be used in situations where the controller decides to check the state of a device which can abruptly reset without warning. Change-Id: Ib0841535f8baf7bbdf8e737a816a400ee072ab93 Signed-off-by: Bhaumik Bhatt --- include/linux/mhi.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/mhi.h b/include/linux/mhi.h index dbcb34c91716..c540f928f3fc 100644 --- a/include/linux/mhi.h +++ b/include/linux/mhi.h @@ -853,6 +853,12 @@ int mhi_get_remote_time(struct mhi_device *mhi_dev, u64 local_time, u64 remote_time)); +/** + * mhi_get_exec_env - Return execution environment of the device + * @mhi_cntrl: MHI controller + */ +enum mhi_ee mhi_get_exec_env(struct mhi_controller *mhi_cntrl); + /** * mhi_get_mhi_state - Return MHI state of device * @mhi_cntrl: MHI controller