charging: fixed unit can't connected PC sometimes

sometimes vbus_type register don't be cleared by itself when
removed usb cable. So can not run charger removed code logic.

Workaround DSEL 47nf Cap HW issue of Milanf on TI BQ25890 

Change-Id: I354bb10f46d3ffc59b949849b1f6e43eeae1e928
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2110861
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
This commit is contained in:
mahj8 2021-11-09 16:37:13 +08:00 • committed by Haijian Ma
commit 25c3701a54

View file

@ -2040,7 +2040,7 @@ static void bq2589x_charger_irq_workfunc(struct work_struct *work)
reapsd_complete = bq2589x_is_rerun_apsd_complete(bq);
}
if (((bq->vbus_type == BQ2589X_VBUS_NONE) || (bq->vbus_type == BQ2589X_VBUS_OTG)) && (bq->status & BQ2589X_STATUS_PLUGIN)) {
if (((!state.vbus_gd) || (bq->vbus_type == BQ2589X_VBUS_OTG)) && (bq->status & BQ2589X_STATUS_PLUGIN)) {
dev_info(bq->dev, "%s:adapter removed\n", __func__);
bq->status &= ~BQ2589X_STATUS_PLUGIN;
bq2589x_adapter_out_func(bq);
@ -2094,6 +2094,7 @@ static irqreturn_t bq2589x_charger_interrupt(int irq, void *data)
{
struct bq2589x *bq = data;
dev_info(bq->dev, "%s", __func__);
schedule_work(&bq->irq_work);
return IRQ_HANDLED;
}