License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[linux-block.git] / drivers / staging / sm750fb / ddk750_dvi.c
CommitLineData
b2441318 1// SPDX-License-Identifier: GPL-2.0
919ca7c6 2#define USE_DVICHIP
81dee67e 3#ifdef USE_DVICHIP
efe9bc08 4#include "ddk750_chip.h"
81dee67e
SM
5#include "ddk750_reg.h"
6#include "ddk750_dvi.h"
7#include "ddk750_sii164.h"
8
2d17105e
EL
9/*
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
12 * is not supported.
13 */
259fef35 14static dvi_ctrl_device_t g_dcftSupportedDviController[] = {
81dee67e 15#ifdef DVI_CTRL_SII164
78376535
JL
16 {
17 .pfnInit = sii164InitChip,
18 .pfnGetVendorId = sii164GetVendorID,
19 .pfnGetDeviceId = sii164GetDeviceID,
81dee67e 20#ifdef SII164_FULL_FUNCTIONS
78376535
JL
21 .pfnResetChip = sii164ResetChip,
22 .pfnGetChipString = sii164GetChipString,
23 .pfnSetPower = sii164SetPower,
24 .pfnEnableHotPlugDetection = sii164EnableHotPlugDetection,
25 .pfnIsConnected = sii164IsConnected,
26 .pfnCheckInterrupt = sii164CheckInterrupt,
27 .pfnClearInterrupt = sii164ClearInterrupt,
81dee67e 28#endif
78376535 29 },
81dee67e
SM
30#endif
31};
32
c9750456
MD
33int dviInit(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)
81dee67e
SM
43{
44 dvi_ctrl_device_t *pCurrentDviCtrl;
40403c1b 45
81dee67e 46 pCurrentDviCtrl = g_dcftSupportedDviController;
a4ce9386 47 if (pCurrentDviCtrl->pfnInit) {
c9750456
MD
48 return pCurrentDviCtrl->pfnInit(edgeSelect,
49 busSelect,
50 dualEdgeClkSelect,
51 hsyncEnable,
52 vsyncEnable,
53 deskewEnable,
54 deskewSetting,
55 continuousSyncEnable,
56 pllFilterEnable,
57 pllFilterValue);
81dee67e 58 }
5ee35ea7 59 return -1; /* error */
81dee67e
SM
60}
61
81dee67e 62#endif