From patchwork Mon Aug 16 10:00:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mattijs Korpershoek X-Patchwork-Id: 12438075 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.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 F1BCFC4338F for ; Mon, 16 Aug 2021 10:02:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BCAA661AA3 for ; Mon, 16 Aug 2021 10:02:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BCAA661AA3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=+3yRLheQLgnXwzqfxzLGwKtTm6JZVdNxngkXWYKHo9o=; b=tY7HdbueCzW/dE Gjek+Xpu5LWo7bz+aSpkdcaVRHkSn2OIp071dN+4uJTbWLAlzP+23mfnRgi3+AON7IhKwlKsdL4qN ygz1FdRF0LUbCyfAZxXGSYm4dncxvJ/pl/a06H0EJNxDJsbIG52djCc0xJX6gNBIxL+CAyZQRtscj iOF5UYSasu+FWibe0aEDuCmLM0qasMGcSTa7iFoNqKSM0RYlV9tcuoeO3Af3nzmsntHjY0z0lb2ns Z95NhASgVNDS9D7+XGnZzmHP6Q/Y83dP58yoY0Vl2viGAz5cIG+Y5R8oaKenbDATPJRVAc75Dlsc0 Xj4EsZLug+MMiErI/5UQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mFZPx-00GeGd-VW; Mon, 16 Aug 2021 10:00:30 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mFZPq-00GeCc-Ik for linux-arm-kernel@lists.infradead.org; Mon, 16 Aug 2021 10:00:25 +0000 Received: by mail-wr1-x431.google.com with SMTP id q6so11212590wrv.6 for ; Mon, 16 Aug 2021 03:00:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WXtfrlhTvK5I4Q1AcToRyUZbAQ+Zw4tC00SfbVVvbW0=; b=s3ToyYAoY23WCoCF6c7fFnVwgRmAsa5SAo30JW235Lg6QeLK2Z63c1kjPVsIGjCZiU gJ+keeK0niCAkyDDssO7o9zgEj+CeU9011sowPpALmwzMfjylFCiQvwubhDOX/noeweA OZitkIVb8Pr8U50KzUrfqAjcUCaeylgShbm+ySjWFsDKqyZatCtpYqrwm52rWm4yqaT7 sS326TZlVB+RIJNXACPI1h1Vhkay8IvlwI9YXh7WfxcZN707rHnmoMu8UzcTc6XjL3PV 6c+rk8HFqer/jR0gAv82tCNBoOxBU9G5WRqBCzkBcOxSjk2hQiJVOZsNjxBW2+9zUt3a dFxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WXtfrlhTvK5I4Q1AcToRyUZbAQ+Zw4tC00SfbVVvbW0=; b=SChGmtjglXXakC56bvSD99jlr2yMSQtqph8cAKsk5QEQwK/GEG5QUA+7kyzzHNGFzS BDqR3eDQkzqeRoLB56YiNQrO4vHnzy8A9xhl7hzD8th0jW21Hg0yligtf/zq0dXlyOh8 TvQdnRABoivDxQAD9FnJbsgkQJCMw8OGJUxEnR/E2OMXqV+pNLdLXioOfDLAvonhMSvY Z8Jdx8/ta7OK6P134ei37x5I0UQ2RC59ssV8gqDTrr2jeMAFNWtUSoCQPc6UI4IVa0lF Wg14GwVfeSjB2QqDMvJGw31Bk54q1/k3rSNNCjCGzy5nf5WkJi+eCZ+x9SQk+XuJGvde JDIQ== X-Gm-Message-State: AOAM531cK9fuJhT0st3Bb52oxfVe+640ebr6oSftSw65xS8NTGFjVeEi KlVVaoh1g1NAfC260RATwmxkRw== X-Google-Smtp-Source: ABdhPJwDGgULKk6muzbBo58qOdzC2JgP8l7B8Uqpu2dQfFY7AAre2f5xvKhTZVqiO41kMGHvn1DEJg== X-Received: by 2002:a5d:4688:: with SMTP id u8mr17685059wrq.148.1629108016922; Mon, 16 Aug 2021 03:00:16 -0700 (PDT) Received: from groot.home ([2a01:cb19:826e:8e00:92b1:d3c2:1204:85e2]) by smtp.gmail.com with ESMTPSA id u10sm1916645wrt.14.2021.08.16.03.00.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Aug 2021 03:00:16 -0700 (PDT) From: Mattijs Korpershoek To: Dmitry Torokhov , Matthias Brugger , Rob Herring Cc: Fabien Parent , Kevin Hilman , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Mattijs Korpershoek Subject: [PATCH RESEND v3 0/4] input: MT6358 PMIC button support Date: Mon, 16 Aug 2021 12:00:09 +0200 Message-Id: <20210816100013.100412-1-mkorpershoek@baylibre.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210816_030022_706543_D805A544 X-CRM114-Status: GOOD ( 12.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The MediaTek MT6358 PMIC has support for two buttons: PWR and HOME. The interrupt logic is a little different than other PMICs from the same family: for MT6323 and MT6397, we have one interrupt source per button * for MT6358, we have two interrupts lines per button: the press and * release interrupts are distinct sources. Changes since original v2 at [1]: * added 4th patch with device tree enable * cover letter title prefixed with 'input' This has been tested with evtest on mt8183-pumpkin on 5.14-rc6 Mattijs Korpershoek (4): Input: mtk-pmic-keys - use get_irq_byname() instead of index dt-bindings: input: mtk-pmic-keys: add MT6358 binding definition Input: mtk-pmic-keys - add support for MT6358 arm64: dts: mt6358: add mt6358-keys node .../bindings/input/mtk-pmic-keys.txt | 5 +- arch/arm64/boot/dts/mediatek/mt6358.dtsi | 12 ++++ drivers/input/keyboard/mtk-pmic-keys.c | 56 +++++++++++++++++-- 3 files changed, 68 insertions(+), 5 deletions(-)