1. 程式人生 > >【FAQ資料】MT6328平臺ISINK呼吸燈模式配置方法

【FAQ資料】MT6328平臺ISINK呼吸燈模式配置方法

MT6328平臺FAQ資料介紹:

描述:

MT6328平臺ISINK呼吸燈模式配置方法

答:

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實現呼吸燈