Merge remote-tracking branch 'asoc/fix/rcar' into asoc-linus
[linux-2.6-block.git] / drivers / staging / sm750fb / ddk750_dvi.c
CommitLineData
919ca7c6 1#define USE_DVICHIP
81dee67e 2#ifdef USE_DVICHIP
efe9bc08 3#include "ddk750_chip.h"
81dee67e
SM
4#include "ddk750_reg.h"
5#include "ddk750_dvi.h"
6#include "ddk750_sii164.h"
7
2d17105e
EL
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 */
259fef35 13static dvi_ctrl_device_t g_dcftSupportedDviController[] = {
81dee67e 14#ifdef DVI_CTRL_SII164
78376535
JL
15 {
16 .pfnInit = sii164InitChip,
17 .pfnGetVendorId = sii164GetVendorID,
18 .pfnGetDeviceId = sii164GetDeviceID,
81dee67e 19#ifdef SII164_FULL_FUNCTIONS
78376535
JL
20 .pfnResetChip = sii164ResetChip,
21 .pfnGetChipString = sii164GetChipString,
22 .pfnSetPower = sii164SetPower,
23 .pfnEnableHotPlugDetection = sii164EnableHotPlugDetection,
24 .pfnIsConnected = sii164IsConnected,
25 .pfnCheckInterrupt = sii164CheckInterrupt,
26 .pfnClearInterrupt = sii164ClearInterrupt,
81dee67e 27#endif
78376535 28 },
81dee67e
SM
29#endif
30};
31
c9750456
MD
32int dviInit(unsigned char edgeSelect,
33 unsigned char busSelect,
34 unsigned char dualEdgeClkSelect,
35 unsigned char hsyncEnable,
36 unsigned char vsyncEnable,
37 unsigned char deskewEnable,
38 unsigned char deskewSetting,
39 unsigned char continuousSyncEnable,
40 unsigned char pllFilterEnable,
41 unsigned char pllFilterValue)
81dee67e
SM
42{
43 dvi_ctrl_device_t *pCurrentDviCtrl;
40403c1b 44
81dee67e 45 pCurrentDviCtrl = g_dcftSupportedDviController;
a4ce9386 46 if (pCurrentDviCtrl->pfnInit) {
c9750456
MD
47 return pCurrentDviCtrl->pfnInit(edgeSelect,
48 busSelect,
49 dualEdgeClkSelect,
50 hsyncEnable,
51 vsyncEnable,
52 deskewEnable,
53 deskewSetting,
54 continuousSyncEnable,
55 pllFilterEnable,
56 pllFilterValue);
81dee67e 57 }
5ee35ea7 58 return -1; /* error */
81dee67e
SM
59}
60
81dee67e 61#endif