From patchwork Fri Jul 2 13:43:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mattijs Korpershoek X-Patchwork-Id: 12356125 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.1 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 D4B64C11F68 for ; Fri, 2 Jul 2021 13:45:32 +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 A66B86142C for ; Fri, 2 Jul 2021 13:45:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A66B86142C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@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=UV4e7G5AoEn9aUFmorZpW/GbTWDsUTnl3gFDWLeuEts=; b=jP/GuHm9T1MlWm /9ezxcIiwDkj23kgiYtKeCdmi1dp1pbJ5++36eX+jc1C4RHxLQqZAh65Mc+LL4Vwr2wP0es8yd5sv Qcx/oYxsWrTRuYAMjU7ji1xxDKg5FAjMV1UtU3jeJ4fXQBQR4Y8jm+0miolDKc8RtwQH8Ebi0sKD7 DabuyTFJd8ya7cUtzms1+rdfxnWE95vyCHxzqNUmx8VWgU1nTqPHqLJw5xXX9KdTh0d6c6zi6bsQe HA9ui4iesKEntBuVoiBRd/JR82jYiDl7LbY3llEBom74jdPIZHl5YoBqogNIIeQyD1coOK/wCoVJ6 09XJEjhG9Ymve462Thbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lzJS6-00394w-1i; Fri, 02 Jul 2021 13:43:30 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lzJS1-00392B-Cl for linux-arm-kernel@lists.infradead.org; Fri, 02 Jul 2021 13:43:27 +0000 Received: by mail-wr1-x436.google.com with SMTP id m18so12559539wrv.2 for ; Fri, 02 Jul 2021 06:43:24 -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=C5PNOf2fBG33kkTj2T2akXL4UB6vTV7M6Cj6RMxXF9w=; b=wRrP5oTN1YQ5BNIwj11/8cQ8IM/n0VL5oAJq3eOB5KcwKKR2jEyg+UJ+pwFGyYVS8R i5xLcqReDthulFqtaWuV6Bk1f9a9XMiZ84dglshI2mGWY6w18g/zSX/rD7RAeE+mNb1Y vkY0OUR66iYLLzaum3IRtNdFXIZrmd+vur0AtgTZSjP5Bp/ZAU+/C5LmOHtlfGyGsljf 6pmRnKT4Lf0TDpTJf7f5lsFtSieme6Zs/oz4vYpX6ybDjR8nhwBfN2ZxlL2ed+NZvl+N KaVaHvjABY/Ct0vMetzChCCNHStcHe6IENQgiVOtdEbvCT41jcPVi+gZIBmvIp16NqW7 IWMQ== 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=C5PNOf2fBG33kkTj2T2akXL4UB6vTV7M6Cj6RMxXF9w=; b=prSxFub51AJT89YVvmq8FK6YM2F2q7UMbkFB33b4VxUZTcjSm96nkc5Lcg6+k9YSO4 AVAh8ag2nHjobnf4xb0V3W1OZcPkSTQDSx9Da2xL5K7mxx5G8OuVl5KFc8prDcL5m9iL qMVkgD1h3KwGXKmTvu5qTod06tUZWh4KU5GfXeRbAYgXqIreAZBhp9FQkOADX8WYbmhI iE1R+KgFlMMrCks/GvWZZ9PIcWs1OCS8q83OlSimYNXdVoBCoCveKv2Mx7tXSHVbjAOv 929Y1h5wUsD1veLFSqM2u7Ry8xckAXi3o5h/8qOgNBqjfSUUPnKsMOZ2U+B6oq9S/PN2 00lw== X-Gm-Message-State: AOAM53147nai9V77UDbCUlK177Eni5Q5W5UVQfOAfZrnBq7t85kq7wKB vCHboI1zRYld34qbuyAr1pAEcw== X-Google-Smtp-Source: ABdhPJw/Yjf+4q1c9i/Cuv+UlNuFg9DhSWnMI7cHOdXk4qMTpxztNFvOYbwAX2D4uqkPydJpaDNbuw== X-Received: by 2002:adf:eccf:: with SMTP id s15mr5880911wro.176.1625233403059; Fri, 02 Jul 2021 06:43:23 -0700 (PDT) Received: from groot.home ([2a01:cb19:826e:8e00:c5f3:6ae:eaf:87a2]) by smtp.gmail.com with ESMTPSA id s1sm12595512wmj.8.2021.07.02.06.43.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jul 2021 06:43:22 -0700 (PDT) From: Mattijs Korpershoek To: Dmitry Torokhov , Matthias Brugger , Rob Herring Cc: Fabien Parent , 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 v3 0/4] input: MT6358 PMIC button support Date: Fri, 2 Jul 2021 15:43:06 +0200 Message-Id: <20210702134310.3451560-1-mkorpershoek@baylibre.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210702_064325_492188_0160A202 X-CRM114-Status: GOOD ( 13.53 ) 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 series depends on [2] [1] https://lore.kernel.org/r/20210512152648.39961-1-mkorpershoek@baylibre.com [2] https://lore.kernel.org/r/20210506094116.638527-1-mkorpershoek@baylibre.com This has been tested with evtest on mt8183-pumpkin using for-mfd-next as base tree. 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(-) base-commit: 495fb48dbd9bcbe15859e086edd24519a6bd2961