int hdmi_drv_power_on(void) { int ret = 0; HDMI_FUNC(); mt65xx_eint_mask(CUST_EINT_MHL_NUM); #if 1 SiiMhlTxHwGpioResume(); //pmic_config_interface(0x87,0x1,0x01,0x0); /* Vanzo:lubaoquan on: Tue, 21 May 2013 22:35:29 +0800 * TODO: replace this line with your comment */ hwPowerOn(MT65XX_POWER_LDO_VGP5, VOL_1200, "HDMI"); // End of Vanzo: lubaoquan #endif //msleep(100); SiiMhlTxHwReset(5,5); //xuecheng HalInstallCheckDeviceCB(SiiCheckDevice); HalAcquireIsrLock(); siHdmiTx_VideoSel(HDMI_720P60); siHdmiTx_AudioSel(I2S_44); ret = SiiMhlTxInitialize(EVENT_POLL_INTERVAL_MS); HalReleaseIsrLock(); mt65xx_eint_unmask(CUST_EINT_MHL_NUM); return ret; }
void hdmi_drv_power_off(void) { HDMI_FUNC(); SiiMhlTxHwGpioSuspend(); SiiMhlTxHwReset(50,200); ForceSwitchToD3(); //SwitchToD3(); //SiiMhlTxHwResetKeepLow(); //pmic_config_interface(0x87,0x0,0x01,0x0); }
void hdmi_drv_power_on(void) { HDMI_FUNC(); mt65xx_eint_mask(CUST_EINT_HDMI_HPD_NUM); SiiMhlTxHwGpioResume(); pmic_config_interface(0x87,0x1,0x01,0x0); //msleep(100); SiiMhlTxHwReset(50,200); //xuecheng HalInstallCheckDeviceCB(SiiCheckDevice); HalAcquireIsrLock(); siHdmiTx_VideoSel(HDMI_720P60); siHdmiTx_AudioSel(I2S_44); SiiMhlTxInitialize(EVENT_POLL_INTERVAL_MS); HalReleaseIsrLock(); mt65xx_eint_unmask(CUST_EINT_HDMI_HPD_NUM); }
void hdmi_drv_power_off(void) { HDMI_FUNC(); #if 1 SiiMhlTxHwGpioSuspend(); #endif SiiMhlTxHwReset(50,200); ForceSwitchToD3(); //SwitchToD3(); //SiiMhlTxHwResetKeepLow(); //pmic_config_interface(0x87,0x0,0x01,0x0); /* Vanzo:lubaoquan on: Tue, 21 May 2013 22:38:24 +0800 * TODO: replace this line with your comment */ hwPowerDown(MT65XX_POWER_LDO_VGP5, "HDMI"); // End of Vanzo: lubaoquan }
int32_t ResumeMhlTxDevice(void) { //halReturn_t halStatus; //SiiOsStatus_t osalStatus; printk("Starting %s\n", MHL_PART_NAME); SiiMhlTxHwReset(10,200); if(!SiiCraInitialize()) { SII_DEBUG_PRINT(SII_OSAL_DEBUG_TRACE,"Initialization of CRA layer failed!\n"); return -EIO; } //msleep(200); HalInstallCheckDeviceCB(SiiCheckDevice); HalAcquireIsrLock(); siHdmiTx_VideoSel(HDMI_720P60); siHdmiTx_AudioSel(I2S_44); SiiMhlTxInitialize(EVENT_POLL_INTERVAL_MS); HalReleaseIsrLock(); return 0; }
int32_t StartMhlTxDevice(void) { halReturn_t halStatus; SiiOsStatus_t osalStatus; printk("Starting %s\n", MHL_PART_NAME); SiiMhlTxHwReset(10,200); if(!SiiCraInitialize()) { SII_DEBUG_PRINT(SII_OSAL_DEBUG_TRACE,"Initialization of CRA layer failed!\n"); return -EIO; } osalStatus = SiiOsInit(0); if (osalStatus != SII_OS_STATUS_SUCCESS) { SII_DEBUG_PRINT(SII_OSAL_DEBUG_TRACE,"Initialization of OSAL failed, error code: %d\n",osalStatus); return -EIO; } halStatus = HalInit(); if (halStatus != HAL_RET_SUCCESS) { SII_DEBUG_PRINT(SII_OSAL_DEBUG_TRACE,"Initialization of HAL failed, error code: %d\n",halStatus); SiiOsTerm(); return -EIO; } //#if MTK_project //xuecheng //I2c_Init(); //#endif halStatus = HalOpenI2cDevice(MHL_PART_NAME, MHL_DRIVER_NAME); if (halStatus != HAL_RET_SUCCESS) { SII_DEBUG_PRINT(SII_OSAL_DEBUG_TRACE,"Opening of I2c device %s failed, error code: %d\n", MHL_PART_NAME, halStatus); HalTerm(); SiiOsTerm(); return -EIO; } msleep(200); #ifdef SiI8338DRIVER_INTERRUPT_MODE halStatus = HalInstallIrqHandler(SiiMhlTxDeviceIsr); if (halStatus != HAL_RET_SUCCESS) { SII_DEBUG_PRINT(SII_OSAL_DEBUG_TRACE,"Initialization of HAL interrupt support failed, error code: %d\n", halStatus); HalCloseI2cDevice(); HalTerm(); SiiOsTerm(); return -EIO; } #else StartEventThread(); /* begin monitoring for events if using polling mode*/ #endif //xuecheng HalInstallCheckDeviceCB(SiiCheckDevice); HalAcquireIsrLock(); siHdmiTx_VideoSel(HDMI_720P60); siHdmiTx_AudioSel(I2S_44); SiiMhlTxInitialize(EVENT_POLL_INTERVAL_MS); HalReleaseIsrLock(); return 0; }