Add linux-next specific files for 20110831
[linux-2.6/next.git] / drivers / media / video / omap3isp / ispccp2.h
blob6674e9de2cd7aace79aedb9fbceb958fbb27bf63
1 /*
2 * ispccp2.h
4 * TI OMAP3 ISP - CCP2 module
6 * Copyright (C) 2010 Nokia Corporation
7 * Copyright (C) 2010 Texas Instruments, Inc.
9 * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
10 * Sakari Ailus <sakari.ailus@iki.fi>
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
24 * 02110-1301 USA
27 #ifndef OMAP3_ISP_CCP2_H
28 #define OMAP3_ISP_CCP2_H
30 #include <linux/videodev2.h>
32 struct isp_device;
33 struct isp_csiphy;
35 /* Sink and source ccp2 pads */
36 #define CCP2_PAD_SINK 0
37 #define CCP2_PAD_SOURCE 1
38 #define CCP2_PADS_NUM 2
40 /* CCP2 input media entity */
41 enum ccp2_input_entity {
42 CCP2_INPUT_NONE,
43 CCP2_INPUT_SENSOR,
44 CCP2_INPUT_MEMORY,
47 /* CCP2 output media entity */
48 enum ccp2_output_entity {
49 CCP2_OUTPUT_NONE,
50 CCP2_OUTPUT_CCDC,
51 CCP2_OUTPUT_MEMORY,
55 /* Logical channel configuration */
56 struct isp_interface_lcx_config {
57 int crc;
58 u32 data_start;
59 u32 data_size;
60 u32 format;
63 /* Memory channel configuration */
64 struct isp_interface_mem_config {
65 u32 dst_port;
66 u32 vsize_count;
67 u32 hsize_count;
68 u32 src_ofst;
69 u32 dst_ofst;
72 /* CCP2 device */
73 struct isp_ccp2_device {
74 struct v4l2_subdev subdev;
75 struct v4l2_mbus_framefmt formats[CCP2_PADS_NUM];
76 struct media_pad pads[CCP2_PADS_NUM];
78 enum ccp2_input_entity input;
79 enum ccp2_output_entity output;
80 struct isp_interface_lcx_config if_cfg;
81 struct isp_interface_mem_config mem_cfg;
82 struct isp_video video_in;
83 struct isp_csiphy *phy;
84 struct regulator *vdds_csib;
85 unsigned int error;
86 enum isp_pipeline_stream_state state;
87 wait_queue_head_t wait;
88 atomic_t stopping;
91 /* Function declarations */
92 int omap3isp_ccp2_init(struct isp_device *isp);
93 void omap3isp_ccp2_cleanup(struct isp_device *isp);
94 int omap3isp_ccp2_register_entities(struct isp_ccp2_device *ccp2,
95 struct v4l2_device *vdev);
96 void omap3isp_ccp2_unregister_entities(struct isp_ccp2_device *ccp2);
97 int omap3isp_ccp2_isr(struct isp_ccp2_device *ccp2);
99 #endif /* OMAP3_ISP_CCP2_H */