1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * TI OMAP4 ISS V4L2 Driver - ISP IPIPE module
5 * Copyright (C) 2012 Texas Instruments, Inc.
7 * Author: Sergio Aguirre <sergio.a.aguirre@gmail.com>
10 #ifndef OMAP4_ISS_IPIPE_H
11 #define OMAP4_ISS_IPIPE_H
13 #include "iss_video.h"
15 enum ipipe_input_entity {
20 #define IPIPE_OUTPUT_VP BIT(0)
22 /* Sink and source IPIPE pads */
23 #define IPIPE_PAD_SINK 0
24 #define IPIPE_PAD_SOURCE_VP 1
25 #define IPIPE_PADS_NUM 2
28 * struct iss_ipipe_device - Structure for the IPIPE module to store its own
30 * @subdev: V4L2 subdevice
31 * @pads: Sink and source media entity pads
32 * @formats: Active video formats
33 * @input: Active input
34 * @output: Active outputs
35 * @error: A hardware error occurred during capture
36 * @state: Streaming state
37 * @wait: Wait queue used to stop the module
38 * @stopping: Stopping state
40 struct iss_ipipe_device {
41 struct v4l2_subdev subdev;
42 struct media_pad pads[IPIPE_PADS_NUM];
43 struct v4l2_mbus_framefmt formats[IPIPE_PADS_NUM];
45 enum ipipe_input_entity input;
49 enum iss_pipeline_stream_state state;
50 wait_queue_head_t wait;
56 int omap4iss_ipipe_register_entities(struct iss_ipipe_device *ipipe,
57 struct v4l2_device *vdev);
58 void omap4iss_ipipe_unregister_entities(struct iss_ipipe_device *ipipe);
60 int omap4iss_ipipe_init(struct iss_device *iss);
61 void omap4iss_ipipe_cleanup(struct iss_device *iss);
63 #endif /* OMAP4_ISS_IPIPE_H */