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

Commit 263c0fd6 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ispif: Adding csid version check"

parents 314a57bd b31418ba
Loading
Loading
Loading
Loading
+14 −3
Original line number Diff line number Diff line
/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2018, 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
@@ -43,6 +43,8 @@
#define ISPIF_TIMEOUT_SLEEP_US                1000
#define ISPIF_TIMEOUT_ALL_US               1000000

#define CSID_VERSION_V37                      0x30070000

#undef CDBG
#ifdef CONFIG_MSMB_CAMERA_DEBUG
#define CDBG(fmt, args...) pr_debug(fmt, ##args)
@@ -123,6 +125,11 @@ static int msm_ispif_reset_hw(struct ispif_device *ispif)

	ispif->clk_idx = 0;

	if (ispif->csid_version != CSID_VERSION_V37) {
		pr_err("%s:%d  error returning\n", __func__, __LINE__);
		return -EINVAL;
	}

	rc = msm_cam_clk_enable(&ispif->pdev->dev,
		ispif_8974_reset_clk_info, reset_clk,
		ARRAY_SIZE(ispif_8974_reset_clk_info), 1);
@@ -1255,8 +1262,12 @@ static int msm_ispif_init(struct ispif_device *ispif,
		goto error_ahb;
	}

	msm_ispif_reset_hw(ispif);

	rc = msm_ispif_reset_hw(ispif);
	if (rc < 0) {
		pr_err("%s:%d  msm_ispif_reset_hw failed\n", __func__,
			 __LINE__);
		goto error_ahb;
	}
	rc = msm_ispif_reset(ispif);
	if (rc == 0) {
		ispif->ispif_state = ISPIF_POWER_UP;