1 /* SPDX-License-Identifier: GPL-2.0 */
5 * Qualcomm MSM Camera Subsystem - ISPIF (ISP Interface) Module
7 * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
8 * Copyright (C) 2015-2018 Linaro Ltd.
10 #ifndef QC_MSM_CAMSS_ISPIF_H
11 #define QC_MSM_CAMSS_ISPIF_H
13 #include <linux/clk.h>
14 #include <media/media-entity.h>
15 #include <media/v4l2-device.h>
16 #include <media/v4l2-subdev.h>
18 #define MSM_ISPIF_PAD_SINK 0
19 #define MSM_ISPIF_PAD_SRC 1
20 #define MSM_ISPIF_PADS_NUM 2
22 #define MSM_ISPIF_VFE_NUM 2
32 struct ispif_intf_cmd_reg
{
38 struct ispif_device
*ispif
;
42 enum ispif_intf interface
;
43 struct v4l2_subdev subdev
;
44 struct media_pad pads
[MSM_ISPIF_PADS_NUM
];
45 struct v4l2_mbus_framefmt fmt
[MSM_ISPIF_PADS_NUM
];
47 unsigned int nformats
;
52 void __iomem
*base_clk_mux
;
55 struct camss_clock
*clock
;
57 struct camss_clock
*clock_for_reset
;
58 int nclocks_for_reset
;
59 struct completion reset_complete
[MSM_ISPIF_VFE_NUM
];
61 struct mutex power_lock
;
62 struct ispif_intf_cmd_reg intf_cmd
[MSM_ISPIF_VFE_NUM
];
63 struct mutex config_lock
;
64 unsigned int line_num
;
65 struct ispif_line
*line
;
69 struct camss_subdev_resources
;
71 int msm_ispif_subdev_init(struct camss
*camss
,
72 const struct camss_subdev_resources
*res
);
74 int msm_ispif_register_entities(struct ispif_device
*ispif
,
75 struct v4l2_device
*v4l2_dev
);
77 void msm_ispif_unregister_entities(struct ispif_device
*ispif
);
79 #endif /* QC_MSM_CAMSS_ISPIF_H */