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

Commit 1903d80e authored by Junzhe Zou's avatar Junzhe Zou
Browse files

msm: camera: lrme: Check the HW state before access register



Check the hardware state before processing irq. Return from function
if hardware is off to avoid NOC error.

Change-Id: Ibaf8014deada205f964eedf57b2128e495d30b5e
Signed-off-by: default avatarJunzhe Zou <jnzhezou@codeaurora.org>
parent 9a66dbb2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -739,6 +739,11 @@ int cam_lrme_hw_process_irq(void *priv, void *data)

	mutex_lock(&lrme_hw->hw_mutex);

	if (lrme_hw->hw_state == CAM_HW_STATE_POWER_DOWN) {
		CAM_DBG(CAM_LRME, "LRME HW is in off state");
		goto end;
	}

	if (top_irq_status & (1 << 3)) {
		CAM_DBG(CAM_LRME, "Error");
		rc = cam_lrme_hw_util_process_err(lrme_hw);