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

Commit 628f46a2 authored by Ashwini Rao's avatar Ashwini Rao Committed by Gerrit - the friendly Code Review server
Browse files

msm: fd: Add FD HW reset sequence after halt



The FD hardware needs to be reset everytime after halt
is called. Adding the reset sequence.

CRs-fixed: 961394

Change-Id: I129de341e619d8c8f6faa69d43c9d13ba21dd88f
Signed-off-by: default avatarAshwini Rao <ashwinik@codeaurora.org>
parent 73135edf
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -493,6 +493,14 @@ static void msm_fd_hw_halt(struct msm_fd_device *fd)
		if (!time)
			dev_err(fd->dev, "Face detection halt timeout\n");

		/* Reset sequence after halt */
		msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_MISC, MSM_FD_MISC_SW_RESET,
			MSM_FD_MISC_SW_RESET_SET);
		msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_CONTROL,
			MSM_FD_CONTROL_SRST);
		msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_MISC,
			MSM_FD_MISC_SW_RESET, 0);
		msm_fd_hw_write_reg(fd, MSM_FD_IOMEM_CORE, MSM_FD_CONTROL, 0);
	}
}