isp10: rockchip: v0.1.6
[firefly-linux-kernel-4.4.55.git] / drivers / media / platform / rk-isp10 / cif_isp10_img_src.h
1 /*
2  *************************************************************************
3  * Rockchip driver for CIF ISP 1.0
4  * (Based on Intel driver for sofiaxxx)
5  *
6  * Copyright (C) 2015 Intel Mobile Communications GmbH
7  * Copyright (C) 2016 Fuzhou Rockchip Electronics Co., Ltd.
8  *
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *************************************************************************
15  */
16
17 #ifndef _CIF_ISP10_IMG_SRC_H
18 #define _CIF_ISP10_IMG_SRC_H
19
20 struct cif_isp10_img_src;
21 struct cif_isp10_strm_fmt_desc;
22 struct cif_isp10_strm_fmt;
23 struct cif_isp10_csi_config;
24 enum cif_isp10_pix_fmt;
25
26 struct cif_isp10_img_src;
27 struct pltfrm_soc_cfg;
28
29 struct cif_isp10_img_src_ctrl {
30         unsigned int id;
31         int val;
32 };
33
34 struct cif_isp10_img_src_ext_ctrl {
35         int cnt;
36         unsigned int class;
37         struct cif_isp10_img_src_ctrl *ctrls;
38 };
39
40 struct cif_isp10_img_src *cif_isp10_img_src_to_img_src(
41         CIF_ISP10_PLTFRM_DEVICE dev,
42         struct pltfrm_soc_cfg *soc_cfg);
43
44 int cif_isp10_img_src_s_streaming(
45         struct cif_isp10_img_src *img_src,
46         bool enable);
47
48 int cif_isp10_img_src_s_power(
49         struct cif_isp10_img_src *img_src,
50         bool on);
51
52 int cif_isp10_img_src_enum_strm_fmts(
53         struct cif_isp10_img_src *img_src,
54         u32 index,
55         struct cif_isp10_strm_fmt_desc *strm_fmt_desc);
56
57 int cif_isp10_img_src_s_strm_fmt(
58         struct cif_isp10_img_src *img_src,
59         struct cif_isp10_strm_fmt *strm_fmt);
60
61 int cif_isp10_img_src_g_ctrl(
62         struct cif_isp10_img_src *img_src,
63         int id,
64         int *val);
65
66 int cif_isp10_img_src_s_ctrl(
67         struct cif_isp10_img_src *img_src,
68         int id,
69         int val);
70
71 const char *cif_isp10_img_src_g_name(
72         struct cif_isp10_img_src *img_src);
73
74 int cif_isp10_img_src_s_ext_ctrls(
75         struct cif_isp10_img_src *img_src,
76         struct cif_isp10_img_src_ext_ctrl *ctrls);
77
78 long cif_isp10_img_src_ioctl(
79         struct cif_isp10_img_src *img_src,
80         unsigned int cmd,
81         void *arg);
82
83 #endif