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

Commit 3898894f authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: cdm: Add hardware version check for cdm"

parents b184c677 372207fa
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 */

#include <linux/delay.h>
@@ -49,6 +49,7 @@ bool cam_cdm_set_cam_hw_version(
	switch (ver) {
	case CAM_CDM170_VERSION:
	case CAM_CDM175_VERSION:
	case CAM_CDM480_VERSION:
		cam_version->major    = (ver & 0xF0000000);
		cam_version->minor    = (ver & 0xFFF0000);
		cam_version->incr     = (ver & 0xFFFF);
@@ -79,6 +80,7 @@ struct cam_cdm_utils_ops *cam_cdm_get_ops(
		switch (ver) {
		case CAM_CDM170_VERSION:
		case CAM_CDM175_VERSION:
		case CAM_CDM480_VERSION:
			return &CDM170_ops;
		default:
			CAM_ERR(CAM_CDM, "CDM Version=%x not supported in util",
@@ -90,6 +92,9 @@ struct cam_cdm_utils_ops *cam_cdm_get_ops(
			(cam_version->incr == 0)) ||
			((cam_version->major == 1) &&
			(cam_version->minor == 1) &&
			(cam_version->incr == 0)) ||
			((cam_version->major == 1) &&
			(cam_version->minor == 2) &&
			(cam_version->incr == 0))) {

			CAM_DBG(CAM_CDM,
+2 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 */

#ifndef _CAM_CDM_CORE_COMMON_H_
@@ -10,6 +10,7 @@

#define CAM_CDM170_VERSION 0x10000000
#define CAM_CDM175_VERSION 0x10010000
#define CAM_CDM480_VERSION 0x10020000

extern struct cam_cdm_utils_ops CDM170_ops;