1 // SPDX-License-Identifier: GPL-2.0
4 #include "ddk750_chip.h"
5 #include "ddk750_reg.h"
6 #include "ddk750_dvi.h"
7 #include "ddk750_sii164.h"
10 * This global variable contains all the supported driver and its corresponding
11 * function API. Please set the function pointer to NULL whenever the function
14 static struct dvi_ctrl_device g_dcftSupportedDviController[] = {
15 #ifdef DVI_CTRL_SII164
17 .pfnInit = sii164InitChip,
18 .pfnGetVendorId = sii164GetVendorID,
19 .pfnGetDeviceId = sii164GetDeviceID,
20 #ifdef SII164_FULL_FUNCTIONS
21 .pfnResetChip = sii164ResetChip,
22 .pfnGetChipString = sii164GetChipString,
23 .pfnSetPower = sii164SetPower,
24 .pfnEnableHotPlugDetection = sii164EnableHotPlugDetection,
25 .pfnIsConnected = sii164IsConnected,
26 .pfnCheckInterrupt = sii164CheckInterrupt,
27 .pfnClearInterrupt = sii164ClearInterrupt,
33 int dviInit(unsigned char edge_select,
34 unsigned char bus_select,
35 unsigned char dual_edge_clk_select,
36 unsigned char hsync_enable,
37 unsigned char vsync_enable,
38 unsigned char deskew_enable,
39 unsigned char deskew_setting,
40 unsigned char continuous_sync_enable,
41 unsigned char pll_filter_enable,
42 unsigned char pll_filter_value)
44 struct dvi_ctrl_device *pCurrentDviCtrl;
46 pCurrentDviCtrl = g_dcftSupportedDviController;
47 if (pCurrentDviCtrl->pfnInit) {
48 return pCurrentDviCtrl->pfnInit(edge_select,
55 continuous_sync_enable,
59 return -1; /* error */