msm: camera: custom: Add support for custom HW

This change provides a template to add any custom HW
block.

CRs-Fixed: 2515662
Change-Id: Ie707c27950a330658cdaa4b64b7e304f4d62a5b2
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
This commit is contained in:
Karthik Anantha Ram
2019-08-26 16:28:49 -07:00
committed by Gerrit - the friendly Code Review server
parent 02f7646413
commit 9c771385d3
25 changed files with 4297 additions and 1 deletions

View File

@@ -0,0 +1,34 @@
/* SPDX-License-Identifier: GPL-2.0-only
*
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
*/
#ifndef _CAM_CUSTOM_DEV_H_
#define _CAM_CUSTOM_DEV_H_
#include "cam_subdev.h"
#include "cam_hw_mgr_intf.h"
#include "cam_custom_hw_mgr.h"
#include "cam_context.h"
#include "cam_custom_context.h"
#define CAM_CUSTOM_HW_MAX_INSTANCES 3
/**
* struct cam_custom_dev - Camera Custom V4l2 device node
*
* @sd: Common camera subdevice node
* @ctx: Custom base context storage
* @ctx_custom: Custom private context storage
* @custom_dev_mutex: Custom dev mutex
* @open_cnt: Open device count
*/
struct cam_custom_dev {
struct cam_subdev sd;
struct cam_context ctx[CAM_CUSTOM_HW_MAX_INSTANCES];
struct cam_custom_context ctx_custom[CAM_CUSTOM_HW_MAX_INSTANCES];
struct mutex custom_dev_mutex;
int32_t open_cnt;
};
#endif /* _CAM_CUSTOM_DEV_H_ */