|
@@ -112,18 +112,16 @@ unsigned short sii164GetDeviceID(void)
|
|
|
* 0 - Success
|
|
|
* -1 - Fail.
|
|
|
*/
|
|
|
-long sii164InitChip(
|
|
|
- unsigned char edgeSelect,
|
|
|
- unsigned char busSelect,
|
|
|
- unsigned char dualEdgeClkSelect,
|
|
|
- unsigned char hsyncEnable,
|
|
|
- unsigned char vsyncEnable,
|
|
|
- unsigned char deskewEnable,
|
|
|
- unsigned char deskewSetting,
|
|
|
- unsigned char continuousSyncEnable,
|
|
|
- unsigned char pllFilterEnable,
|
|
|
- unsigned char pllFilterValue
|
|
|
-)
|
|
|
+long sii164InitChip(unsigned char edgeSelect,
|
|
|
+ unsigned char busSelect,
|
|
|
+ unsigned char dualEdgeClkSelect,
|
|
|
+ unsigned char hsyncEnable,
|
|
|
+ unsigned char vsyncEnable,
|
|
|
+ unsigned char deskewEnable,
|
|
|
+ unsigned char deskewSetting,
|
|
|
+ unsigned char continuousSyncEnable,
|
|
|
+ unsigned char pllFilterEnable,
|
|
|
+ unsigned char pllFilterValue)
|
|
|
{
|
|
|
unsigned char config;
|
|
|
|
|
@@ -259,7 +257,6 @@ void sii164ResetChip(void)
|
|
|
sii164SetPower(1);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/*
|
|
|
* sii164GetChipString
|
|
|
* This function returns a char string name of the current DVI Controller chip.
|
|
@@ -270,7 +267,6 @@ char *sii164GetChipString(void)
|
|
|
return gDviCtrlChipName;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/*
|
|
|
* sii164SetPower
|
|
|
* This function sets the power configuration of the DVI Controller Chip.
|
|
@@ -278,9 +274,7 @@ char *sii164GetChipString(void)
|
|
|
* Input:
|
|
|
* powerUp - Flag to set the power down or up
|
|
|
*/
|
|
|
-void sii164SetPower(
|
|
|
- unsigned char powerUp
|
|
|
-)
|
|
|
+void sii164SetPower(unsigned char powerUp)
|
|
|
{
|
|
|
unsigned char config;
|
|
|
|
|
@@ -298,18 +292,16 @@ void sii164SetPower(
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/*
|
|
|
* sii164SelectHotPlugDetectionMode
|
|
|
* This function selects the mode of the hot plug detection.
|
|
|
*/
|
|
|
-static void sii164SelectHotPlugDetectionMode(
|
|
|
- sii164_hot_plug_mode_t hotPlugMode
|
|
|
-)
|
|
|
+static void sii164SelectHotPlugDetectionMode(sii164_hot_plug_mode_t hotPlugMode)
|
|
|
{
|
|
|
unsigned char detectReg;
|
|
|
|
|
|
- detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT) & ~SII164_DETECT_MONITOR_SENSE_OUTPUT_FLAG;
|
|
|
+ detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT) &
|
|
|
+ ~SII164_DETECT_MONITOR_SENSE_OUTPUT_FLAG;
|
|
|
switch (hotPlugMode) {
|
|
|
case SII164_HOTPLUG_DISABLE:
|
|
|
detectReg |= SII164_DETECT_MONITOR_SENSE_OUTPUT_HIGH;
|
|
@@ -336,9 +328,7 @@ static void sii164SelectHotPlugDetectionMode(
|
|
|
*
|
|
|
* enableHotPlug - Enable (=1) / disable (=0) Hot Plug detection
|
|
|
*/
|
|
|
-void sii164EnableHotPlugDetection(
|
|
|
- unsigned char enableHotPlug
|
|
|
-)
|
|
|
+void sii164EnableHotPlugDetection(unsigned char enableHotPlug)
|
|
|
{
|
|
|
unsigned char detectReg;
|
|
|
|
|
@@ -365,7 +355,8 @@ unsigned char sii164IsConnected(void)
|
|
|
{
|
|
|
unsigned char hotPlugValue;
|
|
|
|
|
|
- hotPlugValue = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT) & SII164_DETECT_HOT_PLUG_STATUS_MASK;
|
|
|
+ hotPlugValue = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT) &
|
|
|
+ SII164_DETECT_HOT_PLUG_STATUS_MASK;
|
|
|
if (hotPlugValue == SII164_DETECT_HOT_PLUG_STATUS_ON)
|
|
|
return 1;
|
|
|
else
|
|
@@ -384,7 +375,8 @@ unsigned char sii164CheckInterrupt(void)
|
|
|
{
|
|
|
unsigned char detectReg;
|
|
|
|
|
|
- detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT) & SII164_DETECT_MONITOR_STATE_MASK;
|
|
|
+ detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT) &
|
|
|
+ SII164_DETECT_MONITOR_STATE_MASK;
|
|
|
if (detectReg == SII164_DETECT_MONITOR_STATE_CHANGE)
|
|
|
return 1;
|
|
|
else
|
|
@@ -401,7 +393,8 @@ void sii164ClearInterrupt(void)
|
|
|
|
|
|
/* Clear the MDI interrupt */
|
|
|
detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT);
|
|
|
- i2cWriteReg(SII164_I2C_ADDRESS, SII164_DETECT, detectReg | SII164_DETECT_MONITOR_STATE_CLEAR);
|
|
|
+ i2cWriteReg(SII164_I2C_ADDRESS, SII164_DETECT,
|
|
|
+ detectReg | SII164_DETECT_MONITOR_STATE_CLEAR);
|
|
|
}
|
|
|
|
|
|
#endif
|