android 10 关闭关机充电的红色呼吸灯

— a/vendor/mediatek/proprietary/bootable/bootloader/preloader/platform/mt6739/src/drivers/platform.c
+++ b/vendor/mediatek/proprietary/bootable/bootloader/preloader/platform/mt6739/src/drivers/platform.c
@@ -1362,7 +1362,7 @@ extern int mt8193_init(void);
#define AW_LED_MOUDLE_ENABLE_MASK 0xE1

#define AW_SETTINT_CURRENT_LEVEL 0x02
-#define AW_SETTING_BRIGHTNESS_VALUE 0x80//128
+#define AW_SETTING_BRIGHTNESS_VALUE 0xFF//128

#define AW_REG_RESET_DEFAULT_VALUE 0x33
enum{
@@ -1434,8 +1434,16 @@ void leds_show_boot(void) {

    aw2013_i2c_write(AW_REG_RESET, 0x55); /*��оƬ����λһ��*/
    udelay(5);
  • aw2013_i2c_write(0x03, 0x15);
    aw2013_i2c_set_leds(255, LED1);
    }

+void leds_deinit(void) {

  • aw2013_i2c_write(AW_REG_RESET, 0x55);
  • udelay(5);
  • //close red blink
  • aw2013_i2c_write(0x03, 0x15);
    +}
    #endif

void platform_init(void)
@@ -1488,6 +1496,26 @@ void platform_init(void)
#endif
BOOTING_TIME_PROFILING_LOG(“rtc_bbpu_power_on”);

+#ifdef CONFIG_AW2013_3LINE_LED
+#if defined(SWCHR_POWER_PATH)

  •   int bat_val = get_i_sense_volt(5);
    

+#else

  •   int bat_val = get_bat_sense_volt(5);
    

+#endif

  •    if (bat_val >= 3450) {
    
  •        print("bat_val =%d \n", bat_val);
    
  •        if (g_boot_reason != BR_USB) {
    
  •            print("g_boot_reason = %d  leds_show_boot \n", g_boot_reason);
    
  •            leds_show_boot();
    
  •        } else {
    
  •            print("g_boot_reason = %d  leds_deinit \n", g_boot_reason);
    
  •            leds_deinit();
    
  •        }
    
  •    }
    

+#endif
+
+
#if !CFG_FPGA_PLATFORM
pl_battery_init(false);
#endif
@@ -1573,18 +1601,6 @@ void platform_init(void)
}
#endif

-#ifdef CONFIG_AW2013_3LINE_LED
-#if defined(SWCHR_POWER_PATH)

  •   int bat_val = get_i_sense_volt(5);
    

-#else

  •   int bat_val = get_bat_sense_volt(5);
    

-#endif

  •    if (bat_val >= 3450) {
    
  •        print("bat_val =%d  leds_show_boot \n",bat_val);
    
  •        leds_show_boot();
    
  •    }
    

-#endif

#ifdef MTK_TRNG_CALIBRATION
#if defined MTK_TRNG_CALIBRATION_2ND_ROUND

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值