Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / media / platform / omap3isp / ispccp2.h
blob03e6af3de1d93f13a9712d4962dc5f2ef8aa77b7
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * ispccp2.h
5 * TI OMAP3 ISP - CCP2 module
7 * Copyright (C) 2010 Nokia Corporation
8 * Copyright (C) 2010 Texas Instruments, Inc.
10 * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
11 * Sakari Ailus <sakari.ailus@iki.fi>
14 #ifndef OMAP3_ISP_CCP2_H
15 #define OMAP3_ISP_CCP2_H
17 #include <linux/videodev2.h>
19 struct isp_device;
20 struct isp_csiphy;
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 {
29 CCP2_INPUT_NONE,
30 CCP2_INPUT_SENSOR,
31 CCP2_INPUT_MEMORY,
34 /* CCP2 output media entity */
35 enum ccp2_output_entity {
36 CCP2_OUTPUT_NONE,
37 CCP2_OUTPUT_CCDC,
38 CCP2_OUTPUT_MEMORY,
42 /* Logical channel configuration */
43 struct isp_interface_lcx_config {
44 int crc;
45 u32 data_start;
46 u32 data_size;
47 u32 format;
50 /* Memory channel configuration */
51 struct isp_interface_mem_config {
52 u32 dst_port;
53 u32 vsize_count;
54 u32 hsize_count;
55 u32 src_ofst;
56 u32 dst_ofst;
59 /* CCP2 device */
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;
74 atomic_t stopping;
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 */