msleep is not accurate for small delays. Use usleep_range
for accuracy.
CRs-Fixed:
1117121
Change-Id: I9a076f843875bd83a21c96d4e4ea0510e82ce352
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
-/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
#define MHI_PCIE_DEVICE_ID_ZIRC 0x0301
#define MHI_PCIE_DEVICE_ID_9x55 0x0302
-#define MHI_M2_DEBOUNCE_TMR_MS 10
+#define MHI_M2_DEBOUNCE_TMR_US 10000
#define MHI_EV_DB_INTERVAL 1
mhi_set_m_state(mhi_dev_ctxt, MHI_STATE_M2);
write_unlock_irq(&mhi_dev_ctxt->pm_xfer_lock);
- msleep(MHI_M2_DEBOUNCE_TMR_MS);
+ usleep_range(MHI_M2_DEBOUNCE_TMR_US, MHI_M2_DEBOUNCE_TMR_US + 50);
write_lock_irq(&mhi_dev_ctxt->pm_xfer_lock);
/* During DEBOUNCE Time We could be receiving M0 Event */