linux/drivers/staging/sm750fb/ddk750_dvi.c
<<
>>
Prefs
   1#define USE_DVICHIP
   2#ifdef USE_DVICHIP
   3#include "ddk750_chip.h"
   4#include "ddk750_reg.h"
   5#include "ddk750_dvi.h"
   6#include "ddk750_sii164.h"
   7
   8
   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 */
  14static dvi_ctrl_device_t g_dcftSupportedDviController[] = {
  15#ifdef DVI_CTRL_SII164
  16        {
  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,
  28#endif
  29        },
  30#endif
  31};
  32
  33
  34int dviInit(
  35        unsigned char edgeSelect,
  36        unsigned char busSelect,
  37        unsigned char dualEdgeClkSelect,
  38        unsigned char hsyncEnable,
  39        unsigned char vsyncEnable,
  40        unsigned char deskewEnable,
  41        unsigned char deskewSetting,
  42        unsigned char continuousSyncEnable,
  43        unsigned char pllFilterEnable,
  44        unsigned char pllFilterValue
  45                        )
  46{
  47        dvi_ctrl_device_t *pCurrentDviCtrl;
  48
  49        pCurrentDviCtrl = g_dcftSupportedDviController;
  50        if (pCurrentDviCtrl->pfnInit != NULL) {
  51                return pCurrentDviCtrl->pfnInit(edgeSelect, busSelect, dualEdgeClkSelect, hsyncEnable,
  52                                                vsyncEnable, deskewEnable, deskewSetting, continuousSyncEnable,
  53                                                pllFilterEnable, pllFilterValue);
  54        }
  55        return -1; /* error */
  56}
  57
  58#endif
  59
  60
  61