1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Xilinx Video Timing Controller
4  *
5  * Copyright (C) 2013-2015 Ideas on Board
6  * Copyright (C) 2013-2015 Xilinx, Inc.
7  *
8  * Contacts: Hyun Kwon <hyun.kwon@xilinx.com>
9  *           Laurent Pinchart <laurent.pinchart@ideasonboard.com>
10  */
11 
12 #ifndef __XILINX_VTC_H__
13 #define __XILINX_VTC_H__
14 
15 struct device_node;
16 struct xvtc_device;
17 
18 #define XVTC_MAX_HSIZE			8191
19 #define XVTC_MAX_VSIZE			8191
20 
21 struct xvtc_config {
22 	unsigned int hblank_start;
23 	unsigned int hsync_start;
24 	unsigned int hsync_end;
25 	unsigned int hsize;
26 	unsigned int vblank_start;
27 	unsigned int vsync_start;
28 	unsigned int vsync_end;
29 	unsigned int vsize;
30 };
31 
32 struct xvtc_device *xvtc_of_get(struct device_node *np);
33 void xvtc_put(struct xvtc_device *xvtc);
34 
35 int xvtc_generator_start(struct xvtc_device *xvtc,
36 			 const struct xvtc_config *config);
37 int xvtc_generator_stop(struct xvtc_device *xvtc);
38 
39 #endif /* __XILINX_VTC_H__ */
40