[MTK] Press the Power key to light the slow issue of the screen speed

Source: Internet
Author: User
Tags sleep

Press power key to slow down the screen speed problem

Causes and solutions:

The delay in the resume function of each driver, and the delay of the thread inside the charging driver need to be re-viewed, compared with the original code, except for some necessary delay, the other time delay should be removed, and some often hit log also to be removed, to speed up the speed of pressing the power key to light the screen.

The following code:

Alps\mediatek\custom\common\kernel\lcm\hx8379c_dsi_vdo\hx8379c_dsi_vdo.c

Staticstructlcm_setting_tablelcm_sleep_out_setting[] = {

Sleep out

{0x11, 0, {0x00}},

{Regflag_delay, 120, {}},//150

Display on

{0x29, 0, {0x00}},

{Regflag_delay, 10, {}},

{regflag_end_of_table, 0x00, {}}

};

Alps\mediatek\platform\mt6752\kernel\drivers\power\pmic_chr_type_det.c

static void Hw_bc11_init (void)

{

/*[eton begin]:modify by Jorgenat 2014-11-11

*[reason]: After testing, there is no need to delay 300ms, it will also cause a slow wake-up speed.

*/

Msleep (300);

/*[eton end]*/

Charger_detect_init ();

Rg_bc11_bias_en=1

Mt6325_upmu_set_rg_bc11_bias_en (0x1);

rg_bc11_vsrc_en[1:0]=00

Mt6325_upmu_set_rg_bc11_vsrc_en (0x0);

Rg_bc11_vref_vth = [1:0]=00

Mt6325_upmu_set_rg_bc11_vref_vth (0x0);

......

}

Alps\mediatek\custom\common\kernel\touchpanel\ft6336_p2\ft6336_ts.c

static int Tpd_resume (Structi2c_client *client)

{

Intretval = TPD_OK;

char data;

Tpd_debug ("TPD wake up\n");

#ifdef fts_gesture

chargesture_close= 0;

TPD_DMESG ("tpd_resumegesture_switch=%d \ r \ n", Gesture_switch);

PRINTK ("Tpd_resume ()/11\n");

if (gesture_switch== 1)

{

Gesture_switch= 0;

PRINTK ("%s,setgesture_switchto 0, =%d\n", __func__, Gesture_switch);

I2c_smbus_write_i2c_block_data (i2c_client,0xd0, 1, &gesture_close);

PRINTK ("Tpd_resume ()/22\n");

}

#endif

#ifdefTPD_CLOSE_POWER_IN_SLEEP

Hwpoweron (tpd_power_source,vol_3300, "TP");

#else

#ifdef MT6573

Mt_set_gpio_mode (Gpio_ctp_en_pin,gpio_ctp_en_pin_m_gpio);

Mt_set_gpio_dir (gpio_ctp_en_pin,gpio_dir_out);

Mt_set_gpio_out (Gpio_ctp_en_pin,gpio_out_one);

#endif

Mt_set_gpio_mode (Gpio_ctp_rst_pin,gpio_ctp_rst_pin_m_gpio);

Mt_set_gpio_dir (gpio_ctp_rst_pin,gpio_dir_out);

Mt_set_gpio_out (Gpio_ctp_rst_pin,gpio_out_zero);

Msleep (20);

Mdelay (10);

Mt_set_gpio_mode (Gpio_ctp_rst_pin,gpio_ctp_rst_pin_m_gpio);

Mt_set_gpio_dir (gpio_ctp_rst_pin,gpio_dir_out);

Mt_set_gpio_out (Gpio_ctp_rst_pin,gpio_out_one);

Msleep (310); Whether the reduction can be considered.

#endif

Mt_eint_unmask (Cust_eint_touch_panel_num);

if ((I2c_smbus_read_i2c_block_data (i2c_client,0x00, 1, &data)) < 0)

{

TPD_DMESG ("RESUMEI2C transfer error, line:%d\n", __line__);

}

TPD_UP (0,0,0);

Input_sync (Tpd->dev);

PRINTK ("Tpd_resume ()/33\n");

TPD_DMESG ("Tpdwake up done\n");

Gesture_switch = 0;

PRINTK ("%s,setgesture_switchto 1, =%d\n", __func__, Gesture_switch);

Returnretval;

}

8. SDcard Hot-swapping causes system restart issues

Cause Analysis:

SDcard Interrupt pin connected to the 3.3V voltage, originally 1.8V IO port, resulting in the interruption of the power supply domain voltage high instability, leading to unpredictable problems, such as the failure of GPU transmission;

Workaround:

Remove the resistor from the SDcard interrupt pin connection, disconnect from the hardware, or there will be a crash restart problem if the Codegen.dws file is modified only.

9.80% power-off battery re-open mechanical and electrical quantity display insufficient problem

Problem Causes and solutions:

When the standby current is very large, such as 200mA, it is necessary to re-detect the charge in the resume function of battery when the system wakes up, then use this power to calculate the power, the code such as the blue part:

Recalculation of power will not result in a 80% power 200mA standby Current of more than 8 hours, then unplug the battery to power up really 3% of the low power situation.

G_spm_timer = Normal_wakeup_period; Min

Alps\mediatek\kernel\drivers\power\battery_meter_p2.c

Staticintbattery_meter_resume (Structplatform_device *dev)

{

#if defined (config_power_ext)

#elifdefined (SOC_BY_SW_FG) | | Defined (SOC_BY_HW_FG)

#if defined (SOC_BY_SW_FG)

Kal_int32 Hw_ocv_after_sleep;

#endif

Structtimespecxts, Tom,rtc_time_after_sleep;

#ifdef Mtk_power_ext_detect

if (Kal_true ==bat_is_ext_power ())

return 0;

#endif

Get_xtime_and_monotonic_and_sleep_offset (&xts,&tom, &rtc_time_after_sleep);

_g_bat_sleep_total_time + = rtc_time_after_sleep.tv_sec-g_rtc_time_before_sleep.tv_sec;

BATTERY_XLOG_PRINTK (Bat_log_crti, "[battery_meter_resume] sleep time =%d, G_spm_timer =%d\n", _g_bat_sleep_total_time , G_spm_timer);

#if defined (SOC_BY_HW_FG)

#ifdef Mtk_enable_aging_algorithm

if (bat_is_charger_exist () = = Kal_false)

{

Battery_aging_check ();

}

#endif

#endif

if (_g_bat_sleep_total_time<g_spm_timer) {

Etonguotao 2014-11-03

This would keep battery levelno change after sleep long and resume

return 0;

}

Bat_spm_timeout = true;

#if defined (SOC_BY_SW_FG)

Battery_meter_ctrl (Battery_meter_cmd_get_hw_ocv,&hw_ocv_after_sleep);

if (_g_bat_sleep_total_time>3600)//1hr

{

/*[eton begin]: Modify by Jorgen at2014-7-10

[reason]:fixed the problem that thecapacity would keep a long time at one level

*/

if (Hw_ocv_after_sleep!=g_hw_ocv_before_sleep)

{

GFG_DOD0 =fgauge_read_d_by_v (Hw_ocv_after_sleep);

oam_d0 = GFG_DOD0; Etonguotao 2014-11-03

Oam_v_ocv_2 =oam_v_ocv_1 = hw_ocv_after_sleep;

oam_car_1 =oam_car_1 + (10* (rtc_time_after_sleep.tv_sec-g_rtc_time_before_sleep.tv_sec)/3600);;

Oam_car_2 =oam_car_1 + (10* (rtc_time_after_sleep.tv_sec-g_rtc_time_before_sleep.tv_sec)/3600);;

}

Else

{

oam_car_1 =oam_car_1 + (40* (rtc_time_after_sleep.tv_sec-g_rtc_time_before_sleep.tv_sec)/3600); 0.1mAh

Oam_car_2 =oam_car_2 + (40* (rtc_time_after_sleep.tv_sec-g_rtc_time_before_sleep.tv_sec)/3600); 0.1mAh

}

Etonguotao 2014-11-03

If suspend current verylarge, it need reset FG meter data,

and calculate Batteryvoltage level in resume Func.

if (Upmu_is_chr_det () ==kal_false)

{

g_bat_cap_after_sleep= Fgauge_read_capacity_by_v (Hw_ocv_after_sleep);

Bmt_status. SOC =bmt_status. UI_SOC = G_bat_cap_after_sleep;

Battery_meter_reset ();

}

/*[eton end]*/

}

Else

{

oam_car_1 = oam_car_1 + (20* (rtc_time_after_sleep.tv_sec-g_rtc_time_before_sleep.tv_sec)/3600);//0.1mAh

oam_car_2 = oam_car_2 + (20* (rtc_time_after_sleep.tv_sec-g_rtc_time_before_sleep.tv_sec)/3600);//0.1mAh

}

Bm_print (Bm_log_crti, "sleeptime= (%d) s, be_ocv= (%d), af_ocv= (%d), d0= (%d), car1= (%d), car2= (%d) \ n",

Rtc_time_after_sleep.tv_sec-g_rtc_time_before_sleep.tv_sec, G_hw_ocv_before_sleep, hw_ocv_after_sleep,gFG_DOD0, Oam_car_1, oam_car_2);

#endif

#endif

Bm_print (Bm_log_crti, "[battery_meter_resume].--eton--oam_v_ocv_2=%d, oam_v_ocv_1=%d, oam_car_1=%d, oam_car_2=%d\n ",

Oam_v_ocv_2,oam_v_ocv_1, oam_car_1, oam_car_2);

return 0;

}

10. Different charging curve of switch machine

Causes and solutions:

1), P2 used is the pulse charging method, charge 9 seconds, and then stop for 1 seconds of the form, D5_count_time decided to charge each step of the time, slightly increase the d5_count_time value, you can make the charging curve smooth, but can not add too big, otherwise it will cause voltage rise too high, And the display number is very low;

void Oam_run (void)

{

...

if (gfg_is_charging = = Kal_false)

{

D5_count_time = 80; Eton update by Jorgen at 2014-7-10

d5_count_soc_99 = 0;

}

/*[eton end]*/

Else

{

Charging_current = Get_charging_setting_current ();

Charging_current = charging_current/100;

Charging_current-= 150; Bmt_status. icharging;

D5_count_time_rate = ((((Gfg_batt_capacity_aging*60*60/100/(charging_current-50)) *10) +5)/10;

if (D5_count_time_rate < 1)

D5_count_time_rate = 1;

Adjust the value of the d5_count_time, you can adjust the time of each step of charging,

If D5_count_time = 80, then the detection time for each step of the charge is: 80 seconds

If the voltage reaches the predetermined battery curve after 80 seconds, the charge will be added 1.

D5_count_time =d5_count_time_rate;

}

...

}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.