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

Commit 3cc9efe5 authored by Prakasha Nayak's avatar Prakasha Nayak Committed by Gerrit - the friendly Code Review server
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: I45f309d98c737d60e5f8b579f04577b07358bcfb
Signed-off-by: default avatarPrakasha Nayak <pnayak@codeaurora.org>
parent fe47cf3d
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2019, 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
@@ -734,6 +734,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);