1 | /* SPDX-License-Identifier: GPL-2.0 */ |
2 | #ifndef DDK750_DVI_H__ |
3 | #define DDK750_DVI_H__ |
4 | |
5 | /* dvi chip stuffs structros */ |
6 | |
7 | typedef long (*PFN_DVICTRL_INIT)(unsigned char edge_select, |
8 | unsigned char bus_select, |
9 | unsigned char dual_edge_clk_select, |
10 | unsigned char hsync_enable, |
11 | unsigned char vsync_enable, |
12 | unsigned char deskew_enable, |
13 | unsigned char deskew_setting, |
14 | unsigned char continuous_sync_enable, |
15 | unsigned char pll_filter_enable, |
16 | unsigned char pll_filter_value); |
17 | |
18 | typedef void (*PFN_DVICTRL_RESETCHIP)(void); |
19 | typedef char* (*PFN_DVICTRL_GETCHIPSTRING)(void); |
20 | typedef unsigned short (*PFN_DVICTRL_GETVENDORID)(void); |
21 | typedef unsigned short (*PFN_DVICTRL_GETDEVICEID)(void); |
22 | typedef void (*PFN_DVICTRL_SETPOWER)(unsigned char power_up); |
23 | typedef void (*PFN_DVICTRL_HOTPLUGDETECTION)(unsigned char enable_hot_plug); |
24 | typedef unsigned char (*PFN_DVICTRL_ISCONNECTED)(void); |
25 | typedef unsigned char (*PFN_DVICTRL_CHECKINTERRUPT)(void); |
26 | typedef void (*PFN_DVICTRL_CLEARINTERRUPT)(void); |
27 | |
28 | /* Structure to hold all the function pointer to the DVI Controller. */ |
29 | struct dvi_ctrl_device { |
30 | PFN_DVICTRL_INIT init; |
31 | PFN_DVICTRL_RESETCHIP reset_chip; |
32 | PFN_DVICTRL_GETCHIPSTRING get_chip_string; |
33 | PFN_DVICTRL_GETVENDORID get_vendor_id; |
34 | PFN_DVICTRL_GETDEVICEID get_device_id; |
35 | PFN_DVICTRL_SETPOWER set_power; |
36 | PFN_DVICTRL_HOTPLUGDETECTION enable_hot_plug_detection; |
37 | PFN_DVICTRL_ISCONNECTED is_connected; |
38 | PFN_DVICTRL_CHECKINTERRUPT check_interrupt; |
39 | PFN_DVICTRL_CLEARINTERRUPT clear_interrupt; |
40 | }; |
41 | |
42 | #define DVI_CTRL_SII164 |
43 | |
44 | /* dvi functions prototype */ |
45 | int dvi_init(unsigned char edge_select, |
46 | unsigned char bus_select, |
47 | unsigned char dual_edge_clk_select, |
48 | unsigned char hsync_enable, |
49 | unsigned char vsync_enable, |
50 | unsigned char deskew_enable, |
51 | unsigned char deskew_setting, |
52 | unsigned char continuous_sync_enable, |
53 | unsigned char pll_filter_enable, |
54 | unsigned char pll_filter_value); |
55 | |
56 | #endif |
57 | |
58 | |