コード例 #1
0
/*
 *brief: get lcd control backlight type
 */
hw_lcd_ctrl_bl_type get_hw_lcd_ctrl_bl_type(void)
{
    hw_lcd_ctrl_bl_type ctrl_bl_type = CTRL_BL_BY_UNKNOW;
	/*control backlight by MSM pwm*/
	/* U8661 uses PM pwm. */
	/* C8820VC uses PM pwm. */
	if (machine_is_msm7x27a_umts() || machine_is_msm7x27a_cdma()
		|| machine_is_msm7x27a_U8815() || machine_is_msm7x27a_U8655_EMMC()
		|| machine_is_msm7x27a_U8185() || machine_is_msm7x27a_U8655()
		|| machine_is_msm7x27a_M660()  || machine_is_msm7x27a_U8661()
		|| (machine_is_msm7x27a_C8820() && (HW_VER_SUB_VC <= get_hw_sub_board_id()))
		)
	{
		ctrl_bl_type = CTRL_BL_BY_MSM;
	}
	/*control backlight by LCD output pwm*/
	else if(machine_is_msm7x27a_C8655_NAND()
	        || (machine_is_msm7x27a_C8820() && (HW_VER_SUB_VA == get_hw_sub_board_id()))
		    || machine_is_msm7x27a_C8825D())
	{
		ctrl_bl_type = CTRL_BL_BY_LCD;
	}
	else
	{
		ctrl_bl_type = CTRL_BL_BY_LCD;
	}

    return ctrl_bl_type;
}
コード例 #2
0
/*===========================================================================


FUNCTION     get_compass_gs_position

DESCRIPTION
  This function probe which G-sensor & Campass status type should be used

DEPENDENCIES
  
RETURN VALUE
  None

SIDE EFFECTS
  None
===========================================================================*/
compass_gs_position_type  get_compass_gs_position(void)
{
	compass_gs_position_type compass_gs_position=COMPASS_TOP_GS_TOP;
	/* modify compass and gs position by board id */
    //move C8820\25D define from TOP to BOTTOM
	if (machine_is_msm7x27a_surf() 
	 || machine_is_msm7x27a_ffa() 
	 || machine_is_msm7x27a_umts() 
	 || machine_is_msm7x27a_cdma()
	 || machine_is_msm7x27a_U8815()) 
	{
		compass_gs_position=COMPASS_TOP_GS_TOP;
	}
	/*< DTS2012022006500 yangbo 20120220 begin */
	/*version A and version B has compass, since version C don't have compass*/
	else if(machine_is_msm7x27a_C8820() && (HW_VER_SUB_VC <= get_hw_sub_board_id()))
	{
		compass_gs_position=COMPASS_NONE_GS_BOTTOM;
	}
	/* DTS2012022006500 yangbo 20120220 end > */
	/* add U8655_EMMC, use the u8655 configuration */
	else if (machine_is_msm7x27a_U8655() 
		  || machine_is_msm7x27a_U8655_EMMC()  
		  || machine_is_msm7x27a_C8655_NAND()  
		  || machine_is_msm7x27a_M660()  
		  || machine_is_msm7x27a_U8661()    
		  || machine_is_msm7x27a_C8820()   
		  || machine_is_msm7x27a_C8825D()
		  || machine_is_msm7x30_u8800()
		  || machine_is_msm7x30_u8820() 
		  || machine_is_msm7x30_u8800_51()
		  || machine_is_msm8255_u8800_pro()
		  || machine_is_msm8255_u8860() 
		  || machine_is_msm8255_c8860() 
		  || machine_is_msm8255_u8860lp()
          /* < DTS2012022905490 ganfan 20120301 begin */
          || machine_is_msm8255_u8860_r()
          /* DTS2012022905490 ganfan 20120301 end > */
		  || machine_is_msm8255_u8860_92()            
		  || machine_is_msm8255_u8860_51())
	{
		compass_gs_position=COMPASS_BOTTOM_GS_BOTTOM;
	}
	else if (machine_is_msm7x27a_U8185())	
	{
		compass_gs_position=COMPASS_NONE_GS_TOP;
	}
	else if(machine_is_msm8255_u8680() 
	     || machine_is_msm8255_u8730())
	{
	    compass_gs_position=COMPASS_TOP_GS_TOP;
	}
	/*< DTS2012022300887 fengwei 20120224 begin */
    else if (machine_is_msm7x27a_C8668D() )	
	{
		compass_gs_position = COMPASS_BOTTOM_GS_TOP;
	}
	/* DTS2012022300887 fengwei 20120224 end >*/
	return compass_gs_position;
}
コード例 #3
0
bool qwerty_is_supported(void)
{
	bool ret = false;
/*< DTS2011082902761 zhongjinrong 20110829 begin */
/* < DTS2011121507916 liuyuntao 20111215 begin */
	ret=( machine_is_msm7x27a_umts()||machine_is_msm7x27a_cdma() || machine_is_msm7x27a_M660());
/* DTS2011121507916 liuyuntao 20111215 end > */
/*DTS2011082902761 zhongjinrong 20110829 end> */
	return ret;
}
コード例 #4
0
/* C8820VC uses PM pwm. */
hw_lcd_ctrl_bl_type get_hw_lcd_ctrl_bl_type(void)
{
    hw_lcd_ctrl_bl_type ctrl_bl_type = CTRL_BL_BY_UNKNOW;
	/*< DTS2012021602342 zhongjinrong 20120224 begin */
	/*control backlight by MSM pwm*/
	/*< DTS2012022300887 fengwei 20120224 begin */
	/* C8668D uses PM pwm. */
	if (machine_is_msm7x27a_umts() 
		|| machine_is_msm7x27a_cdma()
		|| machine_is_msm7x27a_U8815() 
		|| machine_is_msm7x27a_U8655_EMMC()
		|| machine_is_msm7x27a_U8185() 
		|| machine_is_msm7x27a_U8655()
		|| machine_is_msm7x27a_M660()
		|| machine_is_msm7x30_u8800()
		|| machine_is_msm7x30_u8820() 
		|| machine_is_msm7x30_u8800_51() 
		|| machine_is_msm8255_u8800_pro()
		|| machine_is_msm8255_u8860() 
		|| machine_is_msm8255_c8860()
		|| machine_is_msm8255_u8860_92()
		|| (machine_is_msm7x27a_C8820() && (HW_VER_SUB_VC <= get_hw_sub_board_id()))
		||machine_is_msm7x27a_U8661()
		|| machine_is_msm7x27a_C8668D() 
		)
	/* DTS2012022300887 fengwei 20120224 end >*/
		/* DTS2012021602342 zhongjinrong 20120224 end >*/
	{
		ctrl_bl_type = CTRL_BL_BY_MSM;
	}
	/*control backlight by LCD output pwm*/
/*< DTS2012021007223 lijianzhao 20120211 begin */
	else if(machine_is_msm7x27a_C8655_NAND()
		|| (machine_is_msm7x27a_C8820() && (HW_VER_SUB_VA == get_hw_sub_board_id()))
		|| machine_is_msm7x27a_C8825D()
        /* < DTS2012022905490 ganfan 20120301 begin */
        || machine_is_msm8255_u8860_r()
        /* DTS2012022905490 ganfan 20120301 end > */
		|| machine_is_msm8255_u8860lp()
		|| machine_is_msm8255_u8860_51()
		/*< DTS2012042605475 zhongjinrong 20120426 begin  */
		|| machine_is_msm8255_u8667()
     	|| machine_is_msm8255_u8680()
	 	|| machine_is_msm8255_u8730())
		/* DTS2012042605475 zhongjinrong 20120426 end >*/
/* DTS2012021007223 lijianzhao 20120211 end >*/
	{
		ctrl_bl_type = CTRL_BL_BY_LCD;
	}
	else
	{
		ctrl_bl_type = CTRL_BL_BY_LCD;
	}
    return ctrl_bl_type;
}
コード例 #5
0
lcd_panel_type get_lcd_panel_type(void)
{
	lcd_panel_type hw_lcd_panel = LCD_NONE;

	if ( machine_is_msm7x30_u8800()
		|| machine_is_msm7x30_u8820() 
		|| machine_is_msm7x30_u8800_51() 
		|| machine_is_msm8255_u8800_pro())
	{
		switch (lcd_id)
		{
			case LCD_HW_ID0:  
				hw_lcd_panel = LCD_NT35582_BYD_WVGA;
				break;
			case LCD_HW_ID1:  
				hw_lcd_panel = LCD_NT35582_TRULY_WVGA;
				break;
			case LCD_HW_ID2:  
				hw_lcd_panel = LCD_NT35510_ALPHA_SI_WVGA;
				break;
			case LCD_HW_ID3:  
				hw_lcd_panel = LCD_NT35510_ALPHA_SI_WVGA_TYPE2;
				break;
			default : 
				hw_lcd_panel = LCD_NT35510_ALPHA_SI_WVGA;
				break;					  
		}
	}
	else if (machine_is_msm8255_u8860() 
		|| machine_is_msm8255_c8860() 
		|| machine_is_msm8255_u8860lp()
        /* < DTS2012022905490 ganfan 20120301 begin */
        || machine_is_msm8255_u8860_r()
        /* DTS2012022905490 ganfan 20120301 end > */
		|| machine_is_msm8255_u8860_92()
		|| machine_is_msm8255_u8860_51())
	{
		switch (lcd_id)
		{
			case LCD_HW_ID0:
				hw_lcd_panel = LCD_NT35560_TOSHIBA_FWVGA;
				break;
			default : 
				hw_lcd_panel = LCD_NT35560_TOSHIBA_FWVGA;
				break;					  
		}
	}
	else if( machine_is_msm8255_u8680()
		|| machine_is_msm8255_u8730())

	{
/*< DTS2012021007223 lijianzhao 20120211 begin */
/*< DTS2012021602342 zhongjinrong 20120224 begin */
		switch (lcd_id)
		{
			case LCD_HW_ID0:
				hw_lcd_panel = MDDI_RSP61408_CHIMEI_WVGA;
				break;
			case LCD_HW_ID1:
				hw_lcd_panel = MDDI_HX8369A_TIANMA_WVGA;
				break;
			case LCD_HW_ID2:
				hw_lcd_panel = MDDI_RSP61408_BYD_WVGA;
				break;
			/*< DTS2012042605475 zhongjinrong 20120426 begin  */
			/* <DTS2012030102766 sunkai 20120301 begin */
            case LCD_HW_ID3:
                hw_lcd_panel = MDDI_RSP61408_TRULY_WVGA;
                break;
			/* DTS2012030102766 sunkai 20120301 end> */
			/* DTS2012042605475 zhongjinrong 20120426 end >*/
			default : 
				hw_lcd_panel = MDDI_RSP61408_CHIMEI_WVGA;
				break;
		}
/* DTS2012021602342 zhongjinrong 20120224 end >*/
	}
	else if( machine_is_msm8255_u8667())
	{
		switch (lcd_id)
		{
			case LCD_HW_ID0:
				hw_lcd_panel = MDDI_HX8357C_CHIMEI_HVGA;
				break;
			/*< DTS2012042605475 zhongjinrong 20120426 begin  */
			/*< DTS2012022401352 qitongliang 20120224 begin */
			case LCD_HW_ID1:
				hw_lcd_panel = MDDI_HX8357C_TIANMA_IPS_HVGA;
				break;
			/* DTS2012022401352 qitongliang 20120224 end >*/
			/* DTS2012042605475 zhongjinrong 20120426 end >*/

			case LCD_HW_ID2:
				hw_lcd_panel = MDDI_HX8357C_CHIMEI_IPS_HVGA;
				break;
			case LCD_HW_ID3:
				hw_lcd_panel = MDDI_HX8357C_TIANMA_HVGA;
				break;
			default:
				hw_lcd_panel = MDDI_HX8357C_CHIMEI_HVGA;
				break;		
		}
	}
/* DTS2012021007223 lijianzhao 20120211 end >*/
	else if( machine_is_msm7x27a_umts()
		|| machine_is_msm7x27a_cdma())
	{
		switch (lcd_id)
		{
			case LCD_HW_ID0:
				hw_lcd_panel = MIPI_NT35560_TOSHIBA_FWVGA;
				break;
			case LCD_HW_ID1:
				hw_lcd_panel = LCD_HX8357B_TIANMA_HVGA;
				break;
			default:
				/*no mipi LCD lead to block, so default lcd RGB */
				hw_lcd_panel = LCD_HX8357B_TIANMA_HVGA;
				break;
		}

	}
	else if( machine_is_msm7x27a_U8815() 
		|| machine_is_msm7x27a_C8820()
		|| machine_is_msm7x27a_C8825D() )

	{
		switch (lcd_id)
		{
			case LCD_HW_ID0:
				hw_lcd_panel = MIPI_RSP61408_CHIMEI_WVGA;
				break;
			case LCD_HW_ID1:
				hw_lcd_panel = MIPI_HX8369A_TIANMA_WVGA;
				break;
			case LCD_HW_ID2:
				hw_lcd_panel = MIPI_RSP61408_BYD_WVGA;
				break;
			/* <DTS2012022501992 liguosheng 20120229 begin */
			case LCD_HW_ID3:
				hw_lcd_panel = MIPI_RSP61408_TRULY_WVGA;
				break;
			/* DTS2012022501992 liguosheng 20120229 end> */
			default:
				/*no mipi LCD lead to block, so default lcd RGB */
				hw_lcd_panel = LCD_HX8357B_TIANMA_HVGA;
				break;
		}
	}

	/*< DTS2012022300887 fengwei 20120224 begin */
	else if( machine_is_msm7x27a_U8655() 
		|| machine_is_msm7x27a_U8655_EMMC() 
		|| machine_is_msm7x27a_C8655_NAND()
		|| machine_is_msm7x27a_U8661()
		|| machine_is_msm7x27a_C8668D())
	/* DTS2012022300887 fengwei 20120224 end >*/
	{
		switch (lcd_id)
		{
			case LCD_HW_ID0:
				hw_lcd_panel = MIPI_HX8357C_CHIMEI_HVGA;
				break;
			/* <DTS2012022501992 liguosheng 20120229 begin */
			case LCD_HW_ID1:
			    hw_lcd_panel = MIPI_HX8357C_TIANMA_IPS_HVGA;
				break;
			/* DTS2012022501992 liguosheng 20120229 end> */
			case LCD_HW_ID2:
				hw_lcd_panel = MIPI_HX8357C_CHIMEI_IPS_HVGA;
				break;
			case LCD_HW_ID3:
				hw_lcd_panel = MIPI_HX8357C_TIANMA_HVGA;
				break;
			default: 
				/*no mipi LCD lead to block, so default lcd RGB */
				hw_lcd_panel = LCD_HX8357B_TIANMA_HVGA;
				break;
		}
	}
	else if( machine_is_msm7x27a_U8185())
	{
		switch(lcd_id)
		{
			case LCD_HW_ID0:
				hw_lcd_panel = LCD_HX8347D_TRULY_QVGA;
				break;
			case LCD_HW_ID2:
				hw_lcd_panel = LCD_HX8347G_TIANMA_QVGA;
				break;
			case LCD_HW_ID3:
				hw_lcd_panel = LCD_HX8347D_CHIMEI_QVGA;
				break;
			default:
				hw_lcd_panel = LCD_HX8347G_TIANMA_QVGA;
				break;
		}
	}
	else if(machine_is_msm7x27a_M660())
	{
		switch(lcd_id)
		{
			case LCD_HW_ID0:
				hw_lcd_panel = LCD_HX8357C_TIANMA_HVGA;
				break;
			case LCD_HW_ID1:
				hw_lcd_panel = LCD_HX8357B_TIANMA_HVGA;
				break;
			default:
				hw_lcd_panel = LCD_HX8357C_TIANMA_HVGA;
				break;
		}
	}
	else
	{
		hw_lcd_panel = LCD_HX8357B_TIANMA_HVGA;
	}
	return hw_lcd_panel;
}
コード例 #6
0
bool qwerty_is_supported(void)
{
	bool ret = false;
	ret=( machine_is_msm7x27a_umts()||machine_is_msm7x27a_cdma() || machine_is_msm7x27a_M660());
	return ret;
}
コード例 #7
0
lcd_panel_type get_lcd_panel_type(void)
{
	 lcd_panel_type hw_lcd_panel = LCD_NONE;
	 unsigned int lcd_id = LCD_NONE;

	 lcd_id = get_hw_lcd_id();

	 if( machine_is_msm7x27a_umts()||machine_is_msm7x27a_cdma())
	 {
		 switch (lcd_id)
		 {
			case 0:
				hw_lcd_panel = MIPI_NT35560_TOSHIBA_FWVGA;
				break;
			case 1:
				hw_lcd_panel = LCD_HX8357B_TIANMA_HVGA;
				break;

			default: 
				hw_lcd_panel = LCD_HX8357B_TIANMA_HVGA;
				break;
		 }
	 }
    else if( machine_is_msm7x27a_U8815() ||
             machine_is_msm7x27a_C8820() ||
             machine_is_msm7x27a_C8825D() )
	 {
		 switch (lcd_id)
		 {
			case 0:
				hw_lcd_panel = MIPI_RSP61408_CHIMEI_WVGA;
				break;
			case 1:
				hw_lcd_panel = MIPI_HX8369A_TIANMA_WVGA;
				break;			
			case 2:
				hw_lcd_panel = MIPI_RSP61408_BYD_WVGA;
				break;
			case 3:
				hw_lcd_panel = MIPI_RSP61408_TRULY_WVGA;
				break;

			default: 
				/*no mipi LCD lead to block, so default lcd RGB */
				hw_lcd_panel = LCD_HX8357B_TIANMA_HVGA;
				break;
		 }
	 }
	 /* add U8655_EMMC, use the u8655 configuration */
	 else if( machine_is_msm7x27a_U8655() || machine_is_msm7x27a_U8655_EMMC() || machine_is_msm7x27a_C8655_NAND()||
	          machine_is_msm7x27a_U8661())
	 {
		 switch (lcd_id)
		 {
			/*this IC stand id number 0 and 3,temp add*/
			case 0:
				hw_lcd_panel = MIPI_HX8357C_CHIMEI_HVGA;
				break;
			case 1:
			    hw_lcd_panel = MIPI_HX8357C_TIANMA_IPS_HVGA;
				break;
			case 2:
				hw_lcd_panel = MIPI_HX8357C_CHIMEI_IPS_HVGA;
				break;
			case 3:
				hw_lcd_panel = MIPI_HX8357C_TIANMA_HVGA;
				break;

			default: 
				/*no mipi LCD lead to block, so default lcd RGB */
				hw_lcd_panel = LCD_HX8357B_TIANMA_HVGA;
				break;
		 }
	 }
	 else if( machine_is_msm7x27a_U8185())
	 {
	 	switch(lcd_id)
		{
			case 0:
				hw_lcd_panel = LCD_HX8347D_TRULY_QVGA;
				break;
			case 2:
				hw_lcd_panel = LCD_HX8347G_TIANMA_QVGA;
				break;
			case 3:
				hw_lcd_panel = LCD_HX8347D_CHIMEI_QVGA;
				break;
			default:
				hw_lcd_panel = LCD_HX8347G_TIANMA_QVGA;
				break;
	 	}
	 }
	 else if(machine_is_msm7x27a_M660())
 	 {
 	 	switch(lcd_id)
 	 	{
 	 		case 0:
				hw_lcd_panel = LCD_HX8357C_TIANMA_HVGA;
				break;
			case 1:
				hw_lcd_panel = LCD_HX8357B_TIANMA_HVGA;
				break;		
			default:
				hw_lcd_panel = LCD_HX8357C_TIANMA_HVGA;
				break;
 	 	}
 	 }	 
	 else 
	 {
		hw_lcd_panel = LCD_HX8357B_TIANMA_HVGA;
	 }
	 return hw_lcd_panel;
}