From patchwork Mon Dec 21 09:53:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timon Baetz X-Patchwork-Id: 346534 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=unavailable 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 2DAC7C43333 for ; Mon, 21 Dec 2020 09:54:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EB8B622D6D for ; Mon, 21 Dec 2020 09:54:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726016AbgLUJyi (ORCPT ); Mon, 21 Dec 2020 04:54:38 -0500 Received: from mail-02.mail-europe.com ([51.89.119.103]:40270 "EHLO mail-02.mail-europe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725804AbgLUJyi (ORCPT ); Mon, 21 Dec 2020 04:54:38 -0500 Date: Mon, 21 Dec 2020 09:53:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1608544393; bh=uD0o1RGxUdohZwqEit8GaCkXhH2zAclkKXfTpSwZqmA=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=v1/gSWJFAIavvqux48lCUMXon24cFXEdnlWCehvuz7kr+MfqPgN7kTQO3R8yeEQfb gLavYZs84MGdghM0yn1DhKEd9iRigNVDEWwQVzTRrbm0kKeaYoTNw2/wMEkMS45k6L Yud8YFHv1XeVSEdngr8n1ixZVw6i7gOWXWJO7IB8= To: Krzysztof Kozlowski From: Timon Baetz Cc: Liam Girdwood , Mark Brown , Rob Herring , MyungJoo Ham , Chanwoo Choi , Lee Jones , Sebastian Reichel , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Timon Baetz Reply-To: Timon Baetz Subject: [PATCH v2 1/6] extcon: max8997: Add CHGINS and CHGRM interrupt handling Message-ID: <20201221095001.595366-1-timon.baetz@protonmail.com> In-Reply-To: <20201202203516.43053-1-timon.baetz@protonmail.com> References: <20201202203516.43053-1-timon.baetz@protonmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org This 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 | 4 ++++ 1 file changed, 4 insertions(+) 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;