charging: enable irq wake up

when system suspend and then inserted charger, the system
can't wake up and update charger info.

Change-Id: Idb69dfc330b93d5929ce1b10b5c95491d6997aff
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2155893
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
mahj8 2021-12-28 16:38:26 +08:00 • committed by Haijian Ma
commit c73d42c876

View file

@ -2710,13 +2710,18 @@ static int bq2589x_charger_probe(struct i2c_client *client,
goto err_irq;
}
ret = devm_request_threaded_irq(dev, client->irq, NULL,
bq2589x_charger_interrupt, IRQF_TRIGGER_FALLING | IRQF_ONESHOT, BQ25890_IRQ_PIN, bq);
if (ret) {
dev_err(dev, "%s:Request IRQ %d failed: %d\n", __func__, client->irq, ret);
goto err_irq;
} else {
dev_info(dev, "%s:irq = %d\n", __func__, client->irq);
if (client->irq) {
ret = devm_request_threaded_irq(dev, client->irq, NULL,
bq2589x_charger_interrupt,
IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
BQ25890_IRQ_PIN, bq);
if (ret) {
dev_err(dev, "%s:Request IRQ %d failed: %d\n", __func__, client->irq, ret);
goto err_irq;
} else {
dev_info(dev, "%s:irq = %d\n", __func__, client->irq);
enable_irq_wake(client->irq);
}
}
#ifdef CONFIG_MMI_QC3P_TURBO_CHARGER