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
27 #ifndef OMAP3_ISP_CCP2_H
28 #define OMAP3_ISP_CCP2_H
30 #include <linux/videodev2.h>
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
{
47 /* CCP2 output media entity */
48 enum ccp2_output_entity
{
55 /* Logical channel configuration */
56 struct isp_interface_lcx_config
{
63 /* Memory channel configuration */
64 struct isp_interface_mem_config
{
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 enum isp_pipeline_stream_state state
;
86 wait_queue_head_t wait
;
90 /* Function declarations */
91 int omap3isp_ccp2_init(struct isp_device
*isp
);
92 void omap3isp_ccp2_cleanup(struct isp_device
*isp
);
93 int omap3isp_ccp2_register_entities(struct isp_ccp2_device
*ccp2
,
94 struct v4l2_device
*vdev
);
95 void omap3isp_ccp2_unregister_entities(struct isp_ccp2_device
*ccp2
);
96 void omap3isp_ccp2_isr(struct isp_ccp2_device
*ccp2
);
98 #endif /* OMAP3_ISP_CCP2_H */