1 /* SPDX-License-Identifier: GPL-2.0-only */
5 * TI OMAP3 ISP - CCP2 module
7 * Copyright (C) 2010 Nokia Corporation
8 * Copyright (C) 2010 Texas Instruments, Inc.
14 #ifndef OMAP3_ISP_CCP2_H
15 #define OMAP3_ISP_CCP2_H
17 #include <linux/videodev2.h>
22 /* Sink and source ccp2 pads */
23 #define CCP2_PAD_SINK 0
24 #define CCP2_PAD_SOURCE 1
25 #define CCP2_PADS_NUM 2
27 /* CCP2 input media entity */
28 enum ccp2_input_entity {
34 /* CCP2 output media entity */
35 enum ccp2_output_entity {
42 /* Logical channel configuration */
43 struct isp_interface_lcx_config {
50 /* Memory channel configuration */
51 struct isp_interface_mem_config {
60 struct isp_ccp2_device {
61 struct v4l2_subdev subdev;
62 struct v4l2_mbus_framefmt formats[CCP2_PADS_NUM];
63 struct media_pad pads[CCP2_PADS_NUM];
65 enum ccp2_input_entity input;
66 enum ccp2_output_entity output;
67 struct isp_interface_lcx_config if_cfg;
68 struct isp_interface_mem_config mem_cfg;
69 struct isp_video video_in;
70 struct isp_csiphy *phy;
71 struct regulator *vdds_csib;
72 enum isp_pipeline_stream_state state;
73 wait_queue_head_t wait;
77 /* Function declarations */
78 int omap3isp_ccp2_init(struct isp_device *isp);
79 void omap3isp_ccp2_cleanup(struct isp_device *isp);
80 int omap3isp_ccp2_register_entities(struct isp_ccp2_device *ccp2,
81 struct v4l2_device *vdev);
82 void omap3isp_ccp2_unregister_entities(struct isp_ccp2_device *ccp2);
83 void omap3isp_ccp2_isr(struct isp_ccp2_device *ccp2);
85 #endif /* OMAP3_ISP_CCP2_H */