微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 手机设计讨论 > MTK手机平台交流 > MT6328 ISINK呼吸灯模式配置方法

MT6328 ISINK呼吸灯模式配置方法

时间:10-02 整理:3721RD 点击:
[DESCRIPTION]
MT6328 ISINK呼吸灯模式配置方法
[SOLUTION]
MT6328 ISINK 支持呼吸灯模式的话
需要修改文件alps\kernel-3.10\drivers\misc\mediatek\leds\mt6735\leds.c
修改函数, 以ISINK0为例。
int mt_brightness_set_pMIC(enum mt65xx_led_PMIC pmic_type, u32 level, u32
div)
{
..........
if(pmic_type == MT65XX_LED_PMIC_NLED_ISINK0)
{
pmic_set_register_value(PMIC_RG_DRV_32K_CK_PDN,0x0); // Disable power down
pmic_set_register_value(PMIC_RG_DRV_ISINK0_CK_PDN,0);
pmic_set_register_value(PMIC_RG_DRV_ISINK0_CK_CKSEL,0);
pmic_set_register_value(PMIC_ISINK_CH0_MODE,ISINK_BREATH_MODE);
pmic_set_register_value(PMIC_ISINK_CH0_STEP,ISINK_3);//16mA
pmic_set_register_value(PMIC_ISINK_BREATH0_TR1_SEL,0x02);
pmic_set_register_value(PMIC_ISINK_BREATH0_TR2_SEL,0x02);
pmic_set_register_value(PMIC_ISINK_BREATH0_TF1_SEL,0x02);
pmic_set_register_value(PMIC_ISINK_BREATH0_TF2_SEL,0x02);
pmic_set_register_value(PMIC_ISINK_BREATH0_TON_SEL,0x02);
pmic_set_register_value(PMIC_ISINK_BREATH0_TOFF_SEL,0x03);
pmic_set_register_value(PMIC_ISINK_DIM0_DUTY,15);
pmic_set_register_value(PMIC_ISINK_DIM0_FSEL,1999); => 0.5Hz
if(level){
pmic_set_register_value(PMIC_ISINK_CHOP0_EN,1);
pmic_set_register_value(PMIC_ISINK_CH0_BIAS_EN,1);
pmic_set_register_value(PMIC_ISINK_CH0_EN,NLED_ON);
}else{
pmic_set_register_value(PMIC_ISINK_CHOP0_EN,0);
pmic_set_register_value(PMIC_ISINK_CH0_BIAS_EN,0);
pmic_set_register_value(PMIC_ISINK_CH0_EN,NLED_OFF);
}
}
............
}
具体参数信息可以参考FAQ:[FAQ13419]采用PMIC MT6331、MT6325的Isink实现呼吸

签到专用贴

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top