summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimon Baetz <timon.baetz@protonmail.com>2020-12-30 20:51:53 +0000
committerChanwoo Choi <cw00.choi@samsung.com>2021-04-08 13:10:16 +0900
commit17e8ff013e3e82a66d239777d113b2aaa97a77d4 (patch)
tree3c03edc3f965ecf53b65cc31399fe6a71169c3b9
parente49d033bddf5b565044e2abe4241353959bc9120 (diff)
downloadlinux-17e8ff013e3e82a66d239777d113b2aaa97a77d4.tar.bz2
extcon: max8997: Add CHGINS and CHGRM interrupt handling
This allows the MAX8997 charger to set the current limit depending on the detected extcon charger type. Signed-off-by: Timon Baetz <timon.baetz@protonmail.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
-rw-r--r--drivers/extcon/extcon-max8997.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c
index 337b0eea4e62..e1408075ef7d 100644
--- a/drivers/extcon/extcon-max8997.c
+++ b/drivers/extcon/extcon-max8997.c
@@ -44,6 +44,8 @@ static struct max8997_muic_irq muic_irqs[] = {
{ MAX8997_MUICIRQ_ChgDetRun, "muic-CHGDETRUN" },
{ MAX8997_MUICIRQ_ChgTyp, "muic-CHGTYP" },
{ MAX8997_MUICIRQ_OVP, "muic-OVP" },
+ { MAX8997_PMICIRQ_CHGINS, "pmic-CHGINS" },
+ { MAX8997_PMICIRQ_CHGRM, "pmic-CHGRM" },
};
/* Define supported cable type */
@@ -538,6 +540,8 @@ static void max8997_muic_irq_work(struct work_struct *work)
case MAX8997_MUICIRQ_DCDTmr:
case MAX8997_MUICIRQ_ChgDetRun:
case MAX8997_MUICIRQ_ChgTyp:
+ case MAX8997_PMICIRQ_CHGINS:
+ case MAX8997_PMICIRQ_CHGRM:
/* Handle charger cable */
ret = max8997_muic_chg_handler(info);
break;