From bd7ef18a4d32093569e356b314fa441ef2c148dc Mon Sep 17 00:00:00 2001 From: Hemant Kumar Date: Mon, 20 Jan 2020 15:28:24 -0800 Subject: [PATCH] mhi: core: Log dev wake count in mhi device get/put This helps to debug the timeout between asserting wake doorbell and getting M0 state change event. Change-Id: Ie60d88cb2a22510dd794e0a6dffde6dfe54fb544 Signed-off-by: Hemant Kumar --- drivers/bus/mhi/core/mhi_pm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/bus/mhi/core/mhi_pm.c b/drivers/bus/mhi/core/mhi_pm.c index 34a8fea6df03..8fb9013cca0f 100644 --- a/drivers/bus/mhi/core/mhi_pm.c +++ b/drivers/bus/mhi/core/mhi_pm.c @@ -1525,6 +1525,7 @@ void mhi_device_get(struct mhi_device *mhi_dev, int vote) if (vote & MHI_VOTE_DEVICE) { read_lock_bh(&mhi_cntrl->pm_lock); mhi_cntrl->wake_get(mhi_cntrl, true); + MHI_LOG("dev_wake %d\n", atomic_read(&mhi_cntrl->dev_wake)); read_unlock_bh(&mhi_cntrl->pm_lock); atomic_inc(&mhi_dev->dev_vote); } @@ -1578,6 +1579,7 @@ void mhi_device_put(struct mhi_device *mhi_dev, int vote) mhi_trigger_resume(mhi_cntrl); mhi_cntrl->wake_put(mhi_cntrl, false); + MHI_LOG("dev_wake %d\n", atomic_read(&mhi_cntrl->dev_wake)); read_unlock_bh(&mhi_cntrl->pm_lock); }