aboutsummaryrefslogtreecommitdiff
path: root/drivers/bus/mhi/core/init.c
diff options
context:
space:
mode:
authorBhaumik Bhatt <bbhatt@codeaurora.org>2021-04-01 14:16:12 -0700
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>2021-04-07 12:25:42 +0530
commit3317dc6cea294566e56bddb1b6f2309e6facbfa3 (patch)
tree369448031af22e959a2680d600352e2cca0e2323 /drivers/bus/mhi/core/init.c
parent4e44ae3d6d9c2c2a6d9356dd279c925532d5cd8c (diff)
bus: mhi: core: Improvements to the channel handling state machine
Improve the channel handling state machine such that all commands go through a common function and a validation process to ensure that the state machine is not violated in any way and adheres to the MHI specification. Using this common function allows MHI to eliminate some unnecessary debug messages and code duplication. Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/1617311778-1254-4-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Diffstat (limited to 'drivers/bus/mhi/core/init.c')
-rw-r--r--drivers/bus/mhi/core/init.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/bus/mhi/core/init.c b/drivers/bus/mhi/core/init.c
index a507895f6209..0e54384e9fc5 100644
--- a/drivers/bus/mhi/core/init.c
+++ b/drivers/bus/mhi/core/init.c
@@ -56,6 +56,12 @@ const char * const mhi_state_str[MHI_STATE_MAX] = {
[MHI_STATE_SYS_ERR] = "SYS ERROR",
};
+const char * const mhi_ch_state_type_str[MHI_CH_STATE_TYPE_MAX] = {
+ [MHI_CH_STATE_TYPE_RESET] = "RESET",
+ [MHI_CH_STATE_TYPE_STOP] = "STOP",
+ [MHI_CH_STATE_TYPE_START] = "START",
+};
+
static const char * const mhi_pm_state_str[] = {
[MHI_PM_STATE_DISABLE] = "DISABLE",
[MHI_PM_STATE_POR] = "POWER ON RESET",