mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
focaltech_0flash_v2_mmi:improve charger detection
focaltech_0flash_v2_mmi: improve charger notification callback to set usb state to TP FW ontime Change-Id: I1921e3d8e8ed6cdaf338980993f0ab81f399e970 Reviewed-on: https://gerrit.mot.com/2463579 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jing Hu <hujing3@lenovo.com> Reviewed-by: Wei Deng <dengwei1@motorola.com> Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
c3949d41a0
commit
481f8e6325
1 changed files with 11 additions and 0 deletions
|
|
@ -1896,6 +1896,17 @@ static int fts_charger_notifier_callback(struct notifier_block *nb,
|
|||
} else {
|
||||
ts->usb_detect_flag = prop.intval;
|
||||
//FTS_ERROR("usb prop.intval =%d\n", prop.intval);
|
||||
if(ts->usb_detect_flag != ts->usb_connected){
|
||||
if (ts->usb_detect_flag) {
|
||||
ts->usb_connected = 0x01;
|
||||
} else {
|
||||
ts->usb_connected = 0x00;
|
||||
}
|
||||
if(!ts->suspended){
|
||||
fts_mcu_usb_detect_set(ts->usb_connected);
|
||||
FTS_INFO("%s: Cable status change: 0x%2.2X\n", __func__, ts->usb_connected);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue