mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
devon:charger bring up
cannot detect charger after usb or otg unpluged clear z350 irq when vbus rising or falling Change-Id: Id7d2da0af3606d901c17457184338c72f975948b Signed-off-by: longc102 <longc102@motorola.com> Reviewed-on: https://gerrit.mot.com/2221963 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Submit-Approved: Jira Key Tested-by: Jira Key Reviewed-by: Qiong Xie <xieq2@motorola.com> (cherry picked from commit 0c0ea637941fd2da601a80f338047db89220e683) Reviewed-on: https://gerrit.mot.com/2223149 Reviewed-by: Wang Wang <wangwang1@lenovo.com>
This commit is contained in:
parent
ba341590fc
commit
0493700446
1 changed files with 12 additions and 0 deletions
|
|
@ -532,6 +532,17 @@ int moto_tcmd_wt6670f_get_firmware_version(void)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(moto_tcmd_wt6670f_get_firmware_version);
|
||||
|
||||
static void clear_irq_signal(void)
|
||||
{
|
||||
int ret = 0;
|
||||
u16 data = 0;
|
||||
|
||||
if(QC3P_Z350 == g_qc3p_id){
|
||||
ret = wt6670f_read_word(_wt, 0x11, &data);
|
||||
pr_err("%s: data:%x, ret:%d\n", __func__, data, ret);
|
||||
}
|
||||
}
|
||||
|
||||
static irqreturn_t wt6670f_intr_handler(int irq, void *data)
|
||||
{
|
||||
m_chg_type = 0xff;
|
||||
|
|
@ -597,6 +608,7 @@ static int wt6670_iio_write_raw(struct iio_dev *indio_dev,
|
|||
pr_info("wt6670 set volt count:%d\n",val1);
|
||||
break;
|
||||
case PSY_IIO_START_BC12_DETECTION:
|
||||
clear_irq_signal();
|
||||
wt6670f_reset_chg_type();
|
||||
wt6670f_start_detection();
|
||||
pr_info("wt6670 start bc1.2 detection\n");
|
||||
|
|
|
|||
Loading…
Reference in a new issue