Merge tag 'ofs-pull-tag-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap...
[cascardo/linux.git] / drivers / staging / sm750fb / ddk750_dvi.c
1 #define USE_DVICHIP
2 #ifdef USE_DVICHIP
3 #include "ddk750_help.h"
4 #include "ddk750_reg.h"
5 #include "ddk750_dvi.h"
6 #include "ddk750_sii164.h"
7
8
9 /* This global variable contains all the supported driver and its corresponding
10    function API. Please set the function pointer to NULL whenever the function
11    is not supported. */
12 static dvi_ctrl_device_t g_dcftSupportedDviController[] = {
13 #ifdef DVI_CTRL_SII164
14         {
15                 .pfnInit = sii164InitChip,
16                 .pfnGetVendorId = sii164GetVendorID,
17                 .pfnGetDeviceId = sii164GetDeviceID,
18 #ifdef SII164_FULL_FUNCTIONS
19                 .pfnResetChip = sii164ResetChip,
20                 .pfnGetChipString = sii164GetChipString,
21                 .pfnSetPower = sii164SetPower,
22                 .pfnEnableHotPlugDetection = sii164EnableHotPlugDetection,
23                 .pfnIsConnected = sii164IsConnected,
24                 .pfnCheckInterrupt = sii164CheckInterrupt,
25                 .pfnClearInterrupt = sii164ClearInterrupt,
26 #endif
27         },
28 #endif
29 };
30
31
32 int dviInit(
33         unsigned char edgeSelect,
34         unsigned char busSelect,
35         unsigned char dualEdgeClkSelect,
36         unsigned char hsyncEnable,
37         unsigned char vsyncEnable,
38         unsigned char deskewEnable,
39         unsigned char deskewSetting,
40         unsigned char continuousSyncEnable,
41         unsigned char pllFilterEnable,
42         unsigned char pllFilterValue
43                         )
44 {
45         dvi_ctrl_device_t *pCurrentDviCtrl;
46
47         pCurrentDviCtrl = g_dcftSupportedDviController;
48         if (pCurrentDviCtrl->pfnInit != NULL) {
49                 return pCurrentDviCtrl->pfnInit(edgeSelect, busSelect, dualEdgeClkSelect, hsyncEnable,
50                                                 vsyncEnable, deskewEnable, deskewSetting, continuousSyncEnable,
51                                                 pllFilterEnable, pllFilterValue);
52         }
53         return -1; /* error */
54 }
55
56 #endif
57
58