• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 *
3 * SPDX-License-Identifier: GPL-2.0
4 *
5 * Copyright (C) 2011-2018 ARM or its affiliates
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 *
18 */
19 
20 #ifndef _ISP_V4L2_CTRL_H_
21 #define _ISP_V4L2_CTRL_H_
22 
23 #include <media/v4l2-device.h>
24 #include <media/v4l2-ctrls.h>
25 
26 #define std_hdl_to_isp_ctrl( hdl ) container_of( hdl, isp_v4l2_ctrl_t, ctrl_hdl_std_ctrl )
27 #define cst_hdl_to_isp_ctrl( hdl ) container_of( hdl, isp_v4l2_ctrl_t, ctrl_hdl_cst_ctrl )
28 
29 typedef struct _isp_v4l2_ctrl {
30     /* Fields need to be filled by owner */
31     struct v4l2_device *v4l2_dev;
32     struct video_device *video_dev;
33 
34     /* Fields will be filled by isp_v4l2_ctrl module */
35     uint32_t ctx_id;
36     struct v4l2_ctrl_handler ctrl_hdl_std_ctrl; /* STD ctrl */
37     struct v4l2_ctrl_handler ctrl_hdl_cst_ctrl; /* CST ctrl */
38 } isp_v4l2_ctrl_t;
39 
40 /* external interface to isp-v4l2 module */
41 int isp_v4l2_ctrl_init( uint32_t ctx_id, isp_v4l2_ctrl_t *ctrl );
42 void isp_v4l2_ctrl_deinit( isp_v4l2_ctrl_t *dev );
43 
44 #endif
45