From patchwork Wed Dec 2 21:07:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timon Baetz X-Patchwork-Id: 336399 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C44B2C6369E for ; Wed, 2 Dec 2020 21:08:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 57F9B21D91 for ; Wed, 2 Dec 2020 21:08:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726202AbgLBVIA (ORCPT ); Wed, 2 Dec 2020 16:08:00 -0500 Received: from mail-40134.protonmail.ch ([185.70.40.134]:22617 "EHLO mail-40134.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725866AbgLBVH7 (ORCPT ); Wed, 2 Dec 2020 16:07:59 -0500 Date: Wed, 02 Dec 2020 21:07:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1606943237; bh=E9RxHMzcn7X1FNm4GZyMldmxad4LWG8WG/9s9fSNl74=; h=Date:To:From:Cc:Reply-To:Subject:From; b=qJAHJNR9P8O1TBzC2LGmdRdxfLrppvNALomAWOXBGr3lxp8CJzVpXUyPoFYklpnkh N+31tqe/59saqG70dRpDrPNnN0Lv3HCV14Fr5nRjq1SjpD3JM2S1w3F0BN+s00+fc/ w19fl7TJFnxOqcd1zWPlIxUEKcaqJ3QeOEuKw+V8= To: Sebastian Reichel From: Timon Baetz Cc: Chanwoo Choi , MyungJoo Ham , Krzysztof Kozlowski , Kukjin Kim , Rob Herring , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Timon Baetz Reply-To: Timon Baetz Subject: [PATCH 1/3] extcon: max8997: Add CHGINS and CHGRM interrupt handling Message-ID: <20201202203516.43053-1-timon.baetz@protonmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Allows the MAX8997 charger to set the current limit depending on the detected extcon charger type. Signed-off-by: Timon Baetz --- drivers/extcon/extcon-max8997.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c index 172e116ac1ce..70ffcef12e3e 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,9 @@ 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;