bus: mhi: host: Introduce and use fast suspend counter

MHI fast suspend state change counter can be used to track the
number of times device enters the state. Introduce and use it for
accurate tracking of MHI low power states.

Change-Id: Ibaa0428d5ba13b7776a0c9af58a357f59bb9eda5
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
This commit is contained in:
Bhaumik Bhatt 2020-12-22 11:49:22 -08:00 committed by Gerrit - the friendly Code Review server
parent 6375f3b44a
commit 37cdc4bc4f
2 changed files with 4 additions and 4 deletions

View File

@ -25,8 +25,8 @@ static int mhi_debugfs_states_show(struct seq_file *m, void *d)
mhi_cntrl->wake_set ? "true" : "false");
/* counters */
seq_printf(m, "M0: %u M2: %u M3: %u", mhi_cntrl->M0, mhi_cntrl->M2,
mhi_cntrl->M3);
seq_printf(m, "M0: %u M2: %u M3: %u, M3_fast: %u", mhi_cntrl->M0,
mhi_cntrl->M2, mhi_cntrl->M3, mhi_cntrl->M3_fast);
seq_printf(m, " device wake: %u pending packets: %u\n",
atomic_read(&mhi_cntrl->dev_wake),

View File

@ -354,7 +354,7 @@ struct mhi_controller_config {
* @dev_state: MHI device state
* @dev_wake: Device wakeup count
* @pending_pkts: Pending packets for the controller
* @M0, M2, M3: Counters to track number of device MHI state changes
* @M0, M2, M3, M3_fast: Counters to track number of device MHI state changes
* @transition_list: List of MHI state transitions
* @transition_lock: Lock for protecting MHI state transition list
* @wlock: Lock for protecting device wakeup
@ -444,7 +444,7 @@ struct mhi_controller {
enum mhi_state dev_state;
atomic_t dev_wake;
atomic_t pending_pkts;
u32 M0, M2, M3;
u32 M0, M2, M3, M3_fast;
struct list_head transition_list;
spinlock_t transition_lock;
spinlock_t wlock;