• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ pmic_config_interface函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中pmic_config_interface函数的典型用法代码示例。如果您正苦于以下问题:C++ pmic_config_interface函数的具体用法?C++ pmic_config_interface怎么用?C++ pmic_config_interface使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了pmic_config_interface函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: lcm_compare_id

static unsigned int lcm_compare_id(void)
{
    unsigned int id = 0;

#ifdef BUILD_LK
		pmic_config_interface(0x0532,5,0x7,5);//add by libo for VGP2 POWER ON
		pmic_config_interface(0x050C,1,0x1,15);
#else
		hwPowerOn(MT6323_POWER_LDO_VGP2,VOL_2800,"LCM");
#endif
		MDELAY(100);


    SET_RESET_PIN(1);
    MDELAY(20);
    SET_RESET_PIN(0);
    MDELAY(20);
    SET_RESET_PIN(1);
    MDELAY(100);

		send_ctrl_cmd(0xA100);
		read_data_cmd();
		read_data_cmd();
		read_data_cmd();
		id = read_data_cmd();
		id = (id<<8) | read_data_cmd();
    Lcd_Log("mycat READ OTM8009 LCD ID2%s, id = 0x%x\n", __func__, id);

    return (LCM_ID == id)?1:0;

}
开发者ID:SeriniTY320,项目名称:mediatek,代码行数:31,代码来源:otm8012_nisin_NST397WV3932ANP_CMI_mcu18_wvga.c


示例2: mtk_disable_pmic_otg_mode

static void mtk_disable_pmic_otg_mode(void)
{
	int val;

	pmic_config_interface(0x8068, 0x0, 0x1, 0);
	pmic_config_interface(0x8084, 0x0, 0x1, 0);
	mdelay(50);
	pmic_config_interface(0x8068, 0x0, 0x1, 1);

	val = 1;
	while (val == 1) {
		pmic_read_interface(0x805E, &val, 0x1, 4);
	}

	#if 0
	pmic_config_interface(0x809E, 0x8000, 0xFFFF, 0);

	val = 1;
	while (val == 1) {
		pmic_read_interface(0x809A, &val, 0x1, 15);
	}
	#endif

	/* restore PMIC registers */
	pmic_restore_regs();

	mtk_xhci_mtk_log("set pimc power off, done\n");
}
开发者ID:CobraJet93,项目名称:kernel-3.10.54,代码行数:28,代码来源:xhci-mtk.c


示例3: lcd_power_en

static void lcd_power_en(unsigned char enabled)
{
    if(enabled)
    {      
      #ifdef BUILD_LK
        //VGP6 3.3V
        pmic_config_interface(DIGLDO_CON33, 0x07, PMIC_RG_VGP6_VOSEL_MASK, PMIC_RG_VGP6_VOSEL_SHIFT);  
        pmic_config_interface(DIGLDO_CON12, 0x1, PMIC_RG_VGP6_EN_MASK, PMIC_RG_VGP6_EN_SHIFT); 
      #else
        upmu_set_rg_vgp6_en(0x1);
	      upmu_set_rg_vgp6_vosel(0x7);
      #endif
      MDELAY(20);
    
      mt_set_gpio_mode(GPIO_LCD_BL_EN, GPIO_MODE_00);
      mt_set_gpio_dir(GPIO_LCD_BL_EN, GPIO_DIR_OUT);
      mt_set_gpio_out(GPIO_LCD_BL_EN, GPIO_OUT_ONE);   
    }
    else
    {
      mt_set_gpio_mode(GPIO_LCD_BL_EN, GPIO_MODE_00);
      mt_set_gpio_dir(GPIO_LCD_BL_EN, GPIO_DIR_OUT);
      mt_set_gpio_out(GPIO_LCD_BL_EN, GPIO_OUT_ZERO);
      MDELAY(20);            
      #ifdef BUILD_LK
        //VGP6 3.3V
        pmic_config_interface(DIGLDO_CON12, 0x0, PMIC_RG_VGP6_EN_MASK, PMIC_RG_VGP6_EN_SHIFT); 
        pmic_config_interface(DIGLDO_CON33, 0x0, PMIC_RG_VGP6_VOSEL_MASK, PMIC_RG_VGP6_VOSEL_SHIFT);   
      #else
        upmu_set_rg_vgp6_en(0x0);
	      upmu_set_rg_vgp6_vosel(0x0);
      #endif     	
    }
}
开发者ID:HiRolland,项目名称:alps-fairphone-gpl,代码行数:34,代码来源:cm_n070icn_dsi_vdo.c


示例4: mt_power_off

void mt_power_off(void)
{
#ifdef CONFIG_MTK_PMIC_MT6397
	int ret_val=0;
	int reg_val=0;
#endif

	printk("mt_power_off\n");

#ifdef CONFIG_MTK_PMIC_MT6397
	//Enable CA15 by default for different PMIC behavior
	pmic_config_interface(VCA15_CON7, 0x1, PMIC_VCA15_EN_MASK, PMIC_VCA15_EN_SHIFT);
	pmic_config_interface(VSRMCA15_CON7, 0x1, PMIC_VSRMCA15_EN_MASK, PMIC_VSRMCA15_EN_SHIFT);
	udelay(200);
         
	ret_val=pmic_read_interface(VCA15_CON7, &reg_val, 0xFFFF, 0);
	printk("Reg[0x%x]=0x%x\n", VCA15_CON7, reg_val);
	ret_val=pmic_read_interface(VSRMCA15_CON7, &reg_val, 0xFFFF, 0);
	printk("Reg[0x%x]=0x%x\n", VSRMCA15_CON7, reg_val);
#endif
	/* pull PWRBB low */
	rtc_bbpu_power_down();

	while (1) {
#if defined(CONFIG_POWER_EXT)
		//EVB
		printk("EVB without charger\n");
#else	
		//Phone	
		printk("Phone with charger\n");
		if (pmic_chrdet_status() == KAL_TRUE)
			arch_reset(0, "power_off_with_charger");
#endif
    }
}
开发者ID:georgewhite5,项目名称:android_kernel_amazon_ford,代码行数:35,代码来源:board.c


示例5: charging_get_battery_status

static kal_uint32 charging_get_battery_status(void *data)
{
    kal_uint32 status = STATUS_OK;

#if 0
    //upmu_set_baton_tdet_en(1);    
    //upmu_set_rg_baton_en(1);
    //*(kal_bool*)(data) = upmu_get_rgs_baton_undet();
    *(kal_bool*)(data) = 0; // battery exist
    battery_xlog_printk(BAT_LOG_CRTI,"[charging_get_battery_status] no HW function\n");
#else
    kal_uint32 ret=0;

    pmic_config_interface(MT6332_BATON_CON0, 0x1, MT6332_PMIC_RG_BATON_EN_MASK, MT6332_PMIC_RG_BATON_EN_SHIFT);
    pmic_config_interface(MT6332_TOP_CKPDN_CON0_CLR, 0x80C0, 0xFFFF, 0); //enable BIF clock            
    pmic_config_interface(MT6332_LDO_CON2, 0x1, MT6332_PMIC_RG_VBIF28_EN_MASK, MT6332_PMIC_RG_VBIF28_EN_SHIFT);
    
    mdelay(1);
    ret = mt6332_upmu_get_bif_bat_lost();
    if(ret == 0)
    {
        *(kal_bool*)(data) = 0; // battery exist
        battery_xlog_printk(BAT_LOG_FULL,"[charging_get_battery_status] battery exist.\n");
    }
    else
    {
        *(kal_bool*)(data) = 1; // battery NOT exist
        battery_xlog_printk(BAT_LOG_CRTI,"[charging_get_battery_status] battery NOT exist.\n");
    }
#endif
      
    return status;
}
开发者ID:SelfImp,项目名称:m75,代码行数:33,代码来源:charging_hw_bq24160.c


示例6: lcm_compare_id

static unsigned int lcm_compare_id(void)
{
    unsigned int id = 0;

#ifdef BUILD_LK
			pmic_config_interface(0x0532,5,0x7,5);//add by libo for VGP2 POWER ON
			pmic_config_interface(0x050C,1,0x1,15);
#else
			hwPowerOn(MT6323_POWER_LDO_VGP2,VOL_2800,"LCM");
#endif
			MDELAY(100);
    SET_RESET_PIN(1);
    MDELAY(20);
    SET_RESET_PIN(0);
    MDELAY(20);
    SET_RESET_PIN(1);
    MDELAY(100);
		send_ctrl_cmd(0xDA00);
	 	id = read_data_cmd();
	 	send_ctrl_cmd(0xDB00);
	 	id = read_data_cmd()<<8;
	 	send_ctrl_cmd(0xDC00);
	 	id |= read_data_cmd();

#if defined(BUILD_LK)
	printf("MYCAT Read NT35510 id = %x\n",  id);
#endif

	if(LCM_ID == id)
		return 1;
	else
		return 0;
}
开发者ID:SeriniTY320,项目名称:mediatek,代码行数:33,代码来源:nt35510_yixuntong_BOE_mcu18_wvga.c


示例7: lcd_power_en

static void lcd_power_en(unsigned char enabled)
{
    if (enabled)
    {      
#ifdef BUILD_LK
        /* VGP2_PMU 3V */
        pmic_config_interface(DIGLDO_CON29, 0x6, PMIC_RG_VGP2_VOSEL_MASK, PMIC_RG_VGP2_VOSEL_SHIFT);
        pmic_config_interface(DIGLDO_CON8, 0x1, PMIC_RG_VGP2_EN_MASK, PMIC_RG_VGP2_EN_SHIFT);
#else
        //hwPowerOn(MT65XX_POWER_LDO_VGP2, VOL_3000, "LCM");
        //hwPowerOn(MT6323_POWER_LDO_VGP2, VOL_3000, "LCM");
        upmu_set_rg_vgp2_vosel(0x6);
        upmu_set_rg_vgp2_en(0x1);
#endif
        mt_set_gpio_mode(GPIO_VLCD_VCC_EN, GPIO_MODE_00);
        mt_set_gpio_dir(GPIO_VLCD_VCC_EN, GPIO_DIR_OUT);
        mt_set_gpio_out(GPIO_VLCD_VCC_EN, GPIO_OUT_ONE);
    }
    else
    {      
#ifdef BUILD_LK
        /* VGP2_PMU 3V */
        pmic_config_interface(DIGLDO_CON8, 0x0, PMIC_RG_VGP2_EN_MASK, PMIC_RG_VGP2_EN_SHIFT);
        pmic_config_interface(DIGLDO_CON29, 0x0, PMIC_RG_VGP2_VOSEL_MASK, PMIC_RG_VGP2_VOSEL_SHIFT); 
#else
        //hwPowerDown(MT65XX_POWER_LDO_VGP2, "LCM");
        //hwPowerDown(MT6323_POWER_LDO_VGP2, "LCM");
        upmu_set_rg_vgp2_en(0x0);        
        upmu_set_rg_vgp2_vosel(0x0);
#endif
        mt_set_gpio_mode(GPIO_VLCD_VCC_EN, GPIO_MODE_00);
        mt_set_gpio_dir(GPIO_VLCD_VCC_EN, GPIO_DIR_OUT);
        mt_set_gpio_out(GPIO_VLCD_VCC_EN, GPIO_OUT_ZERO);
    }
}
开发者ID:CryToCry96,项目名称:MT6582_kernel_source,代码行数:35,代码来源:LP079X01.c


示例8: slp_pmic_dvs_vol_init

static void slp_pmic_dvs_vol_init(kal_uint8 volt)
{
    pmic_config_interface((kal_uint8)(BANK0_VPROC_CON0+BUCK_CON8_OFFSET), 
                          (kal_uint8)(volt),
                          (kal_uint8)(BANK_0_BUCK_VOSEL_DVS00_MASK),
                          (kal_uint8)(BANK_0_BUCK_VOSEL_DVS00_SHIFT)
                          );

    pmic_config_interface((kal_uint8)(BANK0_VPROC_CON0+BUCK_CON9_OFFSET), 
                          (kal_uint8)(volt),
                          (kal_uint8)(BANK_0_BUCK_VOSEL_DVS01_MASK),
                          (kal_uint8)(BANK_0_BUCK_VOSEL_DVS01_SHIFT)
                          );

    pmic_config_interface((kal_uint8)(BANK0_VPROC_CON0+BUCK_CONA_OFFSET), 
                          (kal_uint8)(volt),
                          (kal_uint8)(BANK_0_BUCK_VOSEL_DVS10_MASK),
                          (kal_uint8)(BANK_0_BUCK_VOSEL_DVS10_SHIFT)
                          );

    pmic_config_interface((kal_uint8)(BANK0_VPROC_CON0+BUCK_CONB_OFFSET), 
                          (kal_uint8)(volt),
                          (kal_uint8)(BANK_0_BUCK_VOSEL_DVS11_MASK),
                          (kal_uint8)(BANK_0_BUCK_VOSEL_DVS11_SHIFT)
                          );
}
开发者ID:dragonpt,项目名称:android_kernel_acer_c10,代码行数:26,代码来源:mtk_sleep.c


示例9: lcd_power_en

static void lcd_power_en(unsigned char enabled)
{
    #ifdef BUILD_LK
		printf("%s,  %d LK \n", __func__, enabled);
	#else
		printk("%s, %d kernel", __func__, enabled);
	#endif
    if (enabled)
    {      
#ifdef BUILD_LK
#if 0
    #ifdef MTK_PMIC_MT6397
    #else
        /* VGP2_PMU 3V */
        pmic_config_interface(DIGLDO_CON29, 0x6, PMIC_RG_VGP2_VOSEL_MASK, PMIC_RG_VGP2_VOSEL_SHIFT);
        pmic_config_interface(DIGLDO_CON8, 0x1, PMIC_RG_VGP2_EN_MASK, PMIC_RG_VGP2_EN_SHIFT);
    #endif
#endif
    upmu_set_rg_vgp6_vosel(0x05);
    upmu_set_rg_vgp6_sw_en(0x01);
#else
#if 0
    #ifdef MTK_PMIC_MT6397
    #else
        upmu_set_rg_vgp2_vosel(0x6);
        upmu_set_rg_vgp2_en(0x1);
    #endif
#endif
    upmu_set_rg_vgp6_vosel(0x05);
    upmu_set_rg_vgp6_sw_en(0x01);
#endif
        //mt_set_gpio_out(GPIO_LCM_PWR, GPIO_OUT_ONE);
    }
    else
    {      
#ifdef BUILD_LK
#if 0
    #ifdef MTK_PMIC_MT6397
    #else
        /* VGP2_PMU 3V */
        pmic_config_interface(DIGLDO_CON8, 0x0, PMIC_RG_VGP2_EN_MASK, PMIC_RG_VGP2_EN_SHIFT);
        pmic_config_interface(DIGLDO_CON29, 0x0, PMIC_RG_VGP2_VOSEL_MASK, PMIC_RG_VGP2_VOSEL_SHIFT); 
    #endif
#endif
    upmu_set_rg_vgp6_vosel(0x0);
    upmu_set_rg_vgp6_sw_en(0x0);
#else
#if 0
    #ifdef MTK_PMIC_MT6397
    #else
        upmu_set_rg_vgp2_en(0x0);        
        upmu_set_rg_vgp2_vosel(0x0);
    #endif
#endif
    upmu_set_rg_vgp6_vosel(0x0);
    upmu_set_rg_vgp6_sw_en(0x0);
#endif
        //mt_set_gpio_out(GPIO_LCM_PWR, GPIO_OUT_ZERO);
    }
}
开发者ID:luckasfb,项目名称:a3-ll,代码行数:60,代码来源:nt35517_qhd_dsi_video.c


示例10: lcm_compare_id

static unsigned int lcm_compare_id(void)
{
#ifdef BUILD_LK
		  pmic_config_interface(0x0532,5,0x7,5);//add by libo for VGP2 POWER ON
		  pmic_config_interface(0x050C,1,0x1,15);
#else
		  hwPowerOn(MT6323_POWER_LDO_VGP2,VOL_2800,"LCM");
#endif
    MDELAY(100);

	unsigned int id=0,id2=0;
	unsigned char buffer[5],buffer2[2];
	unsigned int array[16];  

	SET_RESET_PIN(1);
	SET_RESET_PIN(0);
	MDELAY(25);
	SET_RESET_PIN(1);
	MDELAY(50);

	array[0]=0x00043902;
	array[1]=0x010980ff; 
	dsi_set_cmdq(array, 2, 1); //{0xff, 3 ,{0x80,0x09,0x01}}, // Command2 Enable
	
	array[0]=0x80001500;
	dsi_set_cmdq(array, 1, 1); //{0x00, 1 ,{0x80}},
	
	array[0]=0x00033902;
	array[1]=0x000980ff;
	dsi_set_cmdq(array, 2, 1); //{0xff, 2 ,{0x80,0x09}}, // Orise Mode Enable
	
	array[0]=0xC6001500;
	dsi_set_cmdq(array, 1, 1); //{0x00, 1 ,{0xC6}},
	
	array[0]=0x03B01500;
	dsi_set_cmdq(array, 1, 1); //{0xB0, 1 ,{0x03}}, // Read Contention Error
	MDELAY(10);

	array[0] = 0x00053700;// set return byte number
	dsi_set_cmdq(array, 1, 1);

	read_reg_v2(0xA1, &buffer, 5); // Read Register 0xA1 : 0x01,0x8B,0x80,0x09         (OTM8009A/OTM8018B);

	id = buffer[2]<<8 |buffer[3]; 

	Lcd_Log("[LSQ] -- otm8018b 0x%x , 0x%x , 0x%x \n",buffer[2],buffer[3],id);

	array[0] = 0x50001500;
	dsi_set_cmdq(array, 1, 1);

	read_reg_v2(0xF8, &buffer2, 2); // Read Register 0xF850 : 0x02,0x35 (OTM8018B); 
	
	id2 = buffer2[0]<<8 |buffer2[1]; 
	Lcd_Log("[LSQ] -- otm8018b 0x%x , 0x%x , 0x%x \n",buffer2[0],buffer2[1],id2);
	
	return ((id2==0x0235)&&(id==0x8009))?1:0;
}
开发者ID:SeriniTY320,项目名称:mediatek,代码行数:57,代码来源:otm8018b_apex_A45147N52H0_HSD_dsi_2_fwvga.c


示例11: dct_pmic_VGP2_enable

static void dct_pmic_VGP2_enable(bool dctEnable)
{
	pmic_config_interface(DIGLDO_CON29, 0x5, PMIC_RG_VGP2_VOSEL_MASK, PMIC_RG_VGP2_VOSEL_SHIFT); // 2.8v ËÕ ÓÂ 2013Äê10ÔÂ31ÈÕ 17:55:43
	pmic_config_interface( (U32)(DIGLDO_CON8),
                             (U32)(dctEnable),
                             (U32)(PMIC_RG_VGP2_EN_MASK),
                             (U32)(PMIC_RG_VGP2_EN_SHIFT)
	                         );
}
开发者ID:SteveHuang27,项目名称:Thunder-Kernel,代码行数:9,代码来源:hx8394_hd720_dsi_vdo_truly.c


示例12: lcm_contrl

static void lcm_contrl(int status)
{
    if(status)
    {
    //VGP6 1.8V
    #ifdef BUILD_LK
        pmic_config_interface( (U32)(DIGLDO_CON33),
                             (U32)(3),
                             (U32)(PMIC_RG_VGP6_VOSEL_MASK),
                             (U32)(PMIC_RG_VGP6_VOSEL_SHIFT)
	                         );
        pmic_config_interface( (U32)(DIGLDO_CON12),
                             (U32)(1),
                             (U32)(PMIC_RG_VGP6_EN_MASK),
                             (U32)(PMIC_RG_VGP6_EN_SHIFT)
	                         ); 
    #else
        hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_1800, "LCM");
    #endif

        MDELAY(5);    

        mt_set_gpio_mode(LCM_EN_PIN, 0);
        mt_set_gpio_dir(LCM_EN_PIN, GPIO_DIR_OUT);
        mt_set_gpio_out(LCM_EN_PIN, status);
    }
    else
    {
        mt_set_gpio_mode(LCM_EN_PIN, 0);
        mt_set_gpio_dir(LCM_EN_PIN, GPIO_DIR_OUT);
        mt_set_gpio_out(LCM_EN_PIN, status);

        MDELAY(110);    

    //VGP6 1.8V
    #ifdef BUILD_LK
        //hwPowerDown(MT65XX_POWER_LDO_VGP6, "LCM");
        /*
        pmic_config_interface( (U32)(DIGLDO_CON33),
                             (U32)(0x00),
                             (U32)(PMIC_RG_VGP6_VOSEL_MASK),
                             (U32)(PMIC_RG_VGP6_VOSEL_SHIFT)
	                         );
	                         */
        pmic_config_interface( (U32)(DIGLDO_CON12),
                             (U32)(0x00),
                             (U32)(PMIC_RG_VGP6_EN_MASK),
                             (U32)(PMIC_RG_VGP6_EN_SHIFT)
	                         ); 
    #else
        hwPowerDown(MT65XX_POWER_LDO_VGP6, "LCM");
    #endif
    }

}
开发者ID:kupyxa4444,项目名称:KashKernel_4.2,代码行数:55,代码来源:r63311_fhd_dsi_vdo_sharp.c


示例13: lcm_resume

static void lcm_resume(void)
{

	unsigned int data_array[16];
	#ifdef BUILD_LK
		printf("%s, LK \n", __func__);
	#else
		pr_debug("%s, kernel", __func__);
	#endif
	
#ifdef BUILD_LK
	//printf("[LK/LCM] lcm_resume() enter\n");
	//VGP6 3.3V
	pmic_config_interface(0x424, 0x1, 0x1, 15); 
	pmic_config_interface(0x45a, 0x07, 0x07, 5);
	//vgp4 1.8V
	pmic_config_interface(0x420, 0x1, 0x1, 15); 
	pmic_config_interface(0x43c, 0x03, 0x07, 5);
#else
	hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM");
	hwPowerOn(MT65XX_POWER_LDO_VGP4, VOL_1800, "LCM");
#endif

	mt_set_gpio_mode(GPIO_LCD_RST_EN, GPIO_MODE_00);
	mt_set_gpio_dir(GPIO_LCD_RST_EN, GPIO_DIR_OUT);
	mt_set_gpio_out(GPIO_LCD_RST_EN, GPIO_OUT_ONE);
	MDELAY(20);
		
	mt_set_gpio_mode(GPIO_LCD_STB_EN, GPIO_MODE_00);
	mt_set_gpio_dir(GPIO_LCD_STB_EN, GPIO_DIR_OUT);
	mt_set_gpio_out(GPIO_LCD_STB_EN, GPIO_OUT_ONE);
	MDELAY(20);
//#endif

	//unsigned int data_array[16];
	//lcm_init();
	MDELAY(50); 
	
	SET_RESET_PIN(1);
	SET_RESET_PIN(0);
	MDELAY(1);
	SET_RESET_PIN(1);


	init_lcm_registers();

	data_array[0] = 0x00101500; // Sleep Out
	dsi_set_cmdq(data_array, 1, 1);
	MDELAY(20);

	data_array[0] = 0x00290500; // Display On
	dsi_set_cmdq(data_array, 1, 1);

}
开发者ID:John677,项目名称:Kernal_k3note,代码行数:54,代码来源:cm_n070ice_dsi_vdo.c


示例14: is_chr_det

static kal_uint32 is_chr_det(void)
{
    kal_uint32 val=0;
    pmic_config_interface(0x10A, 0x1, 0xF, 8);
    pmic_config_interface(0x10A, 0x17,0xFF,0);
    pmic_read_interface(0x108,   &val,0x1, 1);

    battery_xlog_printk(BAT_LOG_CRTI,"[is_chr_det] %d\n", val);
    
    return val;
}
开发者ID:AudioGod,项目名称:MediaTek-HelioX10-Kernel,代码行数:11,代码来源:charging_hw_pmic.c


示例15: lcm_init

static void lcm_init(void)
{

	#ifdef BUILD_LK
		printf("%s, LK \n", __func__);
	#else
		pr_debug("%s, kernel", __func__);
	#endif
	
	#ifdef BUILD_LK
		//printf("[LK/LCM] lcm_init() enter\n");
	//VGP6 3.3V
	pmic_config_interface(0x424, 0x1, 0x1, 15); 
	pmic_config_interface(0x45a, 0x07, 0x07, 5);
	//vgp4 1.8V
	pmic_config_interface(0x420, 0x1, 0x1, 15); 
	pmic_config_interface(0x43c, 0x03, 0x07, 5);
	
	mt_set_gpio_mode(GPIO_LCD_RST_EN, GPIO_MODE_00);
	mt_set_gpio_dir(GPIO_LCD_RST_EN, GPIO_DIR_OUT);
	mt_set_gpio_out(GPIO_LCD_RST_EN, GPIO_OUT_ONE);
	MDELAY(20);
	
	mt_set_gpio_mode(GPIO_LCD_STB_EN, GPIO_MODE_00);
	mt_set_gpio_dir(GPIO_LCD_STB_EN, GPIO_DIR_OUT);
	mt_set_gpio_out(GPIO_LCD_STB_EN, GPIO_OUT_ONE);
	MDELAY(20);

	/*MDELAY(50); 
	
	SET_RESET_PIN(1);
	SET_RESET_PIN(0);
	MDELAY(1);
	SET_RESET_PIN(1);


	init_lcm_registers();*/
	#else
	
	hwPowerOn(MT65XX_POWER_LDO_VGP6, VOL_3300, "LCM");
	hwPowerOn(MT65XX_POWER_LDO_VGP4, VOL_1800, "LCM");
	#endif 

	MDELAY(50); 
	
	SET_RESET_PIN(1);
	SET_RESET_PIN(0);
	MDELAY(1);
	SET_RESET_PIN(1);


	init_lcm_registers();
}
开发者ID:John677,项目名称:Kernal_k3note,代码行数:53,代码来源:cm_n070ice_dsi_vdo.c


示例16: lcm_suspend

static void lcm_suspend(void)
{
	push_table(lcm_deep_sleep_mode_in_setting, sizeof(lcm_deep_sleep_mode_in_setting) / sizeof(struct LCM_setting_table), 1);

#ifdef BUILD_LK
    pmic_config_interface(0x0532,0,0x7,5);//add by libo for VGP2 POWER OFF
    pmic_config_interface(0x050C,0,0x1,15);
#else
    hwPowerDown(MT6323_POWER_LDO_VGP2,"LCM");
#endif


}
开发者ID:SeriniTY320,项目名称:mediatek,代码行数:13,代码来源:OTM9605A_HENGSHENG_HS055PQ_02C_IVO_DSI_2_VDO_QHD.c


示例17: slp_pmic_init

void slp_pmic_init(void)
{
	/* VPROC = 0.9V in sleep mode */
	upmu_buck_vosel_srclken_0(BUCK_VPROC, 0x08);
	upmu_buck_ctrl(BUCK_VPROC, 0x3);

	/* VCORE = 0.9V in sleep mode */
	upmu_buck_vosel(BUCK_VCORE, UPMU_VOLT_0_9_0_0_V);

	/* VM12_INT = 0.9V in sleep mode */
	pmic_config_interface(0x8b, 0x08, 0x1f, 0x0);
	pmic_config_interface(0x8f, 0x1, 0x1, 0x4);
}
开发者ID:5C4R4B3,项目名称:CINK_SLIM_ICS_Opensource,代码行数:13,代码来源:mt6577_sleep.c


示例18: set_usb_dc_in_mode

void set_usb_dc_in_mode(int is_sw_en, int is_sw_mode)
{
    pmic_config_interface(0x8D1E, is_sw_en,   0x1, 4);
    pmic_config_interface(0x8D2C, is_sw_mode, 0x1, 4);
    
    pmic_config_interface(0x8D1E, is_sw_en,   0x1, 5);
    pmic_config_interface(0x8D2C, is_sw_mode, 0x1, 5);

    battery_xlog_printk(BAT_LOG_CRTI,"[set_usb_dc_in_mode] Reg[0x%x]=0x%x, Reg[0x%x]=0x%x\n", 
        0x8D1E, upmu_get_reg_value(0x8D1E),
        0x8D2C, upmu_get_reg_value(0x8D2C)
        );
}
开发者ID:AudioGod,项目名称:MediaTek-HelioX10-Kernel,代码行数:13,代码来源:charging_hw_pmic.c


示例19: lcm_compare_id

static unsigned int lcm_compare_id(void)
{
 
    unsigned int id = 0, id2 = 0;
    unsigned char buffer[3];
    unsigned int data_array[16];

#ifdef BUILD_LK
		  pmic_config_interface(0x0532,5,0x7,5);//add by libo for VGP2 POWER ON
		  pmic_config_interface(0x050C,1,0x1,15);
#else
		  hwPowerOn(MT6323_POWER_LDO_VGP2,VOL_2800,"LCM");
#endif
    MDELAY(100);

    SET_RESET_PIN(1);  //NOTE:should reset LCM firstly
    MDELAY(10);
    SET_RESET_PIN(0);
    MDELAY(10);
    SET_RESET_PIN(1);
    MDELAY(120);	
    
    /*	
    data_array[0] = 0x00110500;		// Sleep Out
    dsi_set_cmdq(data_array, 1, 1);
    MDELAY(120);
    */
    //*************Enable CMD2 Page1  *******************//
    data_array[0]=0x00043902;
    data_array[1]=0x1698FFFF;
    dsi_set_cmdq(data_array, 2, 1);
    MDELAY(20); 
    
    data_array[0] = 0x00033700;// read id return two byte,version and id
    dsi_set_cmdq(data_array, 1, 1);
    MDELAY(20); 
    
    read_reg_v2(0xD3, buffer, 3);
    id = buffer[1]; //we only need ID
    id2= buffer[1] << 8 | buffer[2]; //we test buffer 1
    
 
    Lcd_Log("%s, id=0x%x,id2=0x%x\n", __func__, id,id2);
 
 
     //return (LCM_ID == id2)?1:0;
   return (LCM_ID == id2&&get_lcd_id()==1)?1:0;

	   // return (get_lcd_id()==1)?1:0;

}
开发者ID:SeriniTY320,项目名称:mediatek,代码行数:51,代码来源:ili9806C_hengsheng_HS045PK_02E_dsi_vdo_fwvga.c


示例20: lcm_compare_id

static unsigned int lcm_compare_id(void)
{
    unsigned int id = 0;
		unsigned int idA1=0,idA2=0,idA3=0,idA4=0,idA5=0;
		
#ifdef BUILD_LK
		pmic_config_interface(0x0532,5,0x7,5);//add by libo for VGP2 POWER ON
		pmic_config_interface(0x050C,1,0x1,15);
#else
	//	hwPowerOn(MT6323_POWER_LDO_VGP2,VOL_2800,"LCM");
#endif
		MDELAY(100);


    SET_RESET_PIN(1);
    MDELAY(20);
    SET_RESET_PIN(0);
    MDELAY(20);
    SET_RESET_PIN(1);
    MDELAY(100);

		/**********************
    send_ctrl_cmd(0xDA00);
    read_data_cmd();

    id = read_data_cmd();
		*******************/
		
		send_ctrl_cmd(0xA100);
    idA1 = read_data_cmd();
    Lcd_Log("mycat READ OTM8012A LCD ID%s, idA1 = 0x%x\n", __func__, idA1);
    idA2 = read_data_cmd();
    Lcd_Log("mycat READ OTM8012A LCD ID%s, idA2 = 0x%x\n", __func__, idA2);
    idA3 = read_data_cmd();
    Lcd_Log("mycat READ OTM8012A LCD ID%s, idA3 = 0x%x\n", __func__, idA3);
    idA4 = read_data_cmd();
    Lcd_Log("mycat READ OTM8012A LCD ID%s, idA4 = 0x%x\n", __func__, idA4);
    idA5 = read_data_cmd();
    Lcd_Log("mycat READ OTM8012A LCD ID%s, idA5 = 0x%x\n", __func__, idA5);
           
    id=((idA4 & 0xff) << 8) | idA5;
    Lcd_Log("mycat READ OTM8012A LCD ID%s, ID = 0x%x\n", __func__, id);

    //Lcd_Log("mycat READ OTM8009 LCD ID%s, id = 0x%x\n", __func__, id);


    return (LCM_ID == id)?1:0;

}
开发者ID:jawad6233,项目名称:signal75_cu_jb_configs,代码行数:49,代码来源:otm8009a_suxian_S_40_08700A_mcu_wvga.c



注:本文中的pmic_config_interface函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ pmic_get函数代码示例发布时间:2022-05-30
下一篇:
C++ pmf_device_register函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap