Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a11a031 authored by Karthik Anantha Ram's avatar Karthik Anantha Ram Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: icp: Use usleep instead of msleep for smaller delays



usleep is more precise for smaller sleep times compared to msleep,
hence using it to ensure reduced latency while disabling A5.

Change-Id: I92eeff65caaa3b0739e2df7ca7ec12eecea9638d
Signed-off-by: default avatarKarthik Anantha Ram <kartanan@codeaurora.org>
parent e3e5e5cb
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@
#define HFI_MAX_POLL_TRY 5

#define HFI_MAX_PC_POLL_TRY 150
#define HFI_POLL_TRY_SLEEP 2
#define HFI_POLL_TRY_SLEEP 1

static struct hfi_info *g_hfi;
unsigned int g_icp_mmu_hdl;
@@ -559,7 +559,8 @@ void cam_hfi_disable_cpu(void __iomem *icp_base)
		 * and Host can the proceed. No interrupt is expected from FW
		 * at this time.
		 */
		msleep_interruptible(HFI_POLL_TRY_SLEEP);
		usleep_range(HFI_POLL_TRY_SLEEP * 1000,
			(HFI_POLL_TRY_SLEEP * 1000) + 1000);
		try++;
	}