1、 修改 Hdmi_drv.c 如下:
a. 修改 hdmi_drv_power_on() :
/* note: Tue, 21 May 2013 22:35:29 +0800
* TODO: replace this line with your comment
*/
printk("~~TurnOn VGP5 in hdmi_drv_power_on() \n"); //======= add ==========
hwPowerOn(MT65XX_POWER_LDO_VGP5, VOL_1200, "HDMI");
// End of note: note
b. 修改 hdmi_drv_power_off () :
/* on: Tue, 21 May 2013 22:38:24 +0800
* TODO: replace this line with your comment
*/
printk("~~TurnOff VGP5 in hdmi_drv_power_off() \n"); //======= add ==========
hwPowerDown(MT65XX_POWER_LDO_VGP5, "HDMI");
// End of note: note
c. 修改 void hdmi_drv_suspend(void)
{
hdmi_drv_power_off(); //====== add =========
}
d. 修改 void hdmi_drv_resume(void)
{
hdmi_drv_power_on(); //====== add =========
}
2、修改 mediatek/platform/mt6589/kernel/core/mt_pm_ldo.c 如下:
a. 修改 bool hwPowerOn(MT65XX_POWER powerId, MT65XX_POWER_VOLTAGE powerVolt, char *mode_name)
{
UINT32 i = 0;
int j=0, k=0;
//{============ add begin ===========
if((MT65XX_POWER==MT65XX_POWER_LDO_VGP5)&&(first_power_on_flag==0))
{
xlog_printk(ANDROID_LOG_INFO,"Set VGP5 to %d name: %s ,PowerUsageCounter=%d \n",powerVolt,mode_name,g_MT_PMIC_BusHW.Power[powerId].dwPowerCount);
}
//============ add end ===========}
if(first_power_on_flag == 1)
{
for(j=0 ; j<MT65XX_POWER_COUNT_END ; j++)
b. 修改 bool hwPowerDown(MT65XX_POWER powerId, char *mode_name)
{
UINT32 i;
#if 1
BOOL bFind = FALSE;
//{============ add begin ===========
if((MT65XX_POWER==MT65XX_POWER_LDO_VGP5)&&(first_power_on_flag==0))
{
xlog_printk(ANDROID_LOG_INFO,"To TurnOff VGP5 PowerUsageCounter=%d \n",g_MT_PMIC_BusHW.Power[powerId].dwPowerCount);
}
//============ add end ===========}
if(powerId >= MT65XX_POWER_COUNT_END)
{
MSG(PMIC,"%s:%s:%d powerId:%d is wrong\r\n",__FILE__,__FUNCTION__,
__LINE__ , powerId);
return FALSE;
}
if(powerId >= MT65XX_POWER_COUNT_END)
{
MSG(PMIC,"%s:%s:%d powerId:%d is wrong\r\n",__FILE__,__FUNCTION__,
__LINE__ , powerId);
return FALSE;
}
a. 修改 hdmi_drv_power_on() :
/* note: Tue, 21 May 2013 22:35:29 +0800
* TODO: replace this line with your comment
*/
printk("~~TurnOn VGP5 in hdmi_drv_power_on() \n"); //======= add ==========
hwPowerOn(MT65XX_POWER_LDO_VGP5, VOL_1200, "HDMI");
// End of note: note
b. 修改 hdmi_drv_power_off () :
/* on: Tue, 21 May 2013 22:38:24 +0800
* TODO: replace this line with your comment
*/
printk("~~TurnOff VGP5 in hdmi_drv_power_off() \n"); //======= add ==========
hwPowerDown(MT65XX_POWER_LDO_VGP5, "HDMI");
// End of note: note
c. 修改 void hdmi_drv_suspend(void)
{
hdmi_drv_power_off(); //====== add =========
}
d. 修改 void hdmi_drv_resume(void)
{
hdmi_drv_power_on(); //====== add =========
}
2、修改 mediatek/platform/mt6589/kernel/core/mt_pm_ldo.c 如下:
a. 修改 bool hwPowerOn(MT65XX_POWER powerId, MT65XX_POWER_VOLTAGE powerVolt, char *mode_name)
{
UINT32 i = 0;
int j=0, k=0;
//{============ add begin ===========
if((MT65XX_POWER==MT65XX_POWER_LDO_VGP5)&&(first_power_on_flag==0))
{
xlog_printk(ANDROID_LOG_INFO,"Set VGP5 to %d name: %s ,PowerUsageCounter=%d \n",powerVolt,mode_name,g_MT_PMIC_BusHW.Power[powerId].dwPowerCount);
}
//============ add end ===========}
if(first_power_on_flag == 1)
{
for(j=0 ; j<MT65XX_POWER_COUNT_END ; j++)
b. 修改 bool hwPowerDown(MT65XX_POWER powerId, char *mode_name)
{
UINT32 i;
#if 1
BOOL bFind = FALSE;
//{============ add begin ===========
if((MT65XX_POWER==MT65XX_POWER_LDO_VGP5)&&(first_power_on_flag==0))
{
xlog_printk(ANDROID_LOG_INFO,"To TurnOff VGP5 PowerUsageCounter=%d \n",g_MT_PMIC_BusHW.Power[powerId].dwPowerCount);
}
//============ add end ===========}
if(powerId >= MT65XX_POWER_COUNT_END)
{
MSG(PMIC,"%s:%s:%d powerId:%d is wrong\r\n",__FILE__,__FUNCTION__,
__LINE__ , powerId);
return FALSE;
}
if(powerId >= MT65XX_POWER_COUNT_END)
{
MSG(PMIC,"%s:%s:%d powerId:%d is wrong\r\n",__FILE__,__FUNCTION__,
__LINE__ , powerId);
return FALSE;
}