From patchwork Fri Jan 21 14:03:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mattijs Korpershoek X-Patchwork-Id: 12719756 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 52165C433F5 for ; Fri, 21 Jan 2022 14:05:04 +0000 (UTC) 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=lKTXSsNC7/Smt8Rtxvp9hzToDSV9wcvdsH3WV/cbpws=; b=TwFDoZ8l51ysG9 mAeuAM/Sc8DFRH1nHNXt1UnWi02vNmWJxRziOBR4PQRkVMPrCL0rYnRyvKIJhzYOGqOFQbLJusIbt /YIPCAl46zUdmmnrIAdSKGhhm3YPCz3maYvfoo/NvPDyqoNqGMOsrJmJFOTjQvahZv5i3vpB2r+VW MT9LJT3Ctrx4xCNIuBfBTVU8bwPNMpEK7+2TVvpo0pyywqcFhmsHvDZAiC8JZ8icVe/l7c5Qwy9eG mbteNb20fa94TUF2Y8/rZBrBbGhRb6kOWMPVHajOa5R84umPIbVlB1YSkN1d7x+837SkD3VNttLXE 8ryXpjOaqymPDv+I8K3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nAuVx-00FHkk-4o; Fri, 21 Jan 2022 14:03:42 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nAuVm-00FHev-0M for linux-arm-kernel@lists.infradead.org; Fri, 21 Jan 2022 14:03:32 +0000 Received: by mail-wm1-x330.google.com with SMTP id o1-20020a1c4d01000000b0034d95625e1fso14751123wmh.4 for ; Fri, 21 Jan 2022 06:03:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4l1jtRGL+pYHVAZJF8KgIUHpCfnZhhgBRKh+OiDvorY=; b=fhwTlzKWGaMzqfsup3wVctsfoZXTOQaOFb5R5Juixld0ttqy1JeVP0UBAnOO4SFypl Df1prkauSmcDUosFSq4FqwsGSKYVOkw/bqBDtx72ou6iRRmwyUXBMV/RtyPni7/T2Db8 wsjOpwr9rNKpmvWP9ckaqB/Sf/UZl+6/jpWbyHCWRAm91Ee79b8icLN1nQTbu4Lb/aht jBZCoO75QW8Jm5JEjSctOPETtHCTvm8cM5kB4K2d/gItxQd+q1lB4g+qprWSUABunWlE /kJbwx6fRw7U+uCgbcEu959QoZL6efdJOqgrjmamXjX8Ycdi+of9m5uF9YbOdqAzLMcC ZRbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4l1jtRGL+pYHVAZJF8KgIUHpCfnZhhgBRKh+OiDvorY=; b=h8e3gjBef+xWasBFCHw4xBe7E++NuVtRjEL7VAFgPBfN9ykwqe/bEKPNNi5nc7xjyX Mxxb2DQrZCWuTGoZ/k0CY3ayB+Je82mI11Fu6ILc0K+6QJ7hwxK2qqIZJK9TvtnFp0Kl eF5I0evYGIfDdCEqvtt/7rQzAtirR82SAB1nyuJkiiwcwZWoUUcPSY3OiqjdLTMcPB84 jMIPTs6nuvdKyfTrDoRNkxfUldbOuS0TcMe5l4peaf0yFumRBibXlMp6hwaeZHBx8B2w 7IHiq5mnCm+SVeh4KMEPYULFwFDYzI0DAEDm3K7gMuzAcmGafBw/R869C2Qj1Zmpxqg8 2B0w== X-Gm-Message-State: AOAM531BHSMfZ69v+1pGU3HC3FtWHhDugRnNDXuddUd8k8mR0A6kHYW0 pDtk5Faks4tZGCIX19q2rv2Nwg== X-Google-Smtp-Source: ABdhPJwSn5xqcnOw4GAEgDzNJvgvtqvE75JH7mto0ajETAzgXi5MCr9UUfks/or68aOUSSE9IMIGYQ== X-Received: by 2002:adf:fbc5:: with SMTP id d5mr3913609wrs.83.1642773807588; Fri, 21 Jan 2022 06:03:27 -0800 (PST) Received: from groot.home (lfbn-tou-1-205-205.w86-201.abo.wanadoo.fr. [86.201.52.205]) by smtp.gmail.com with ESMTPSA id p29sm9225129wms.5.2022.01.21.06.03.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jan 2022 06:03:27 -0800 (PST) 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 v4 0/4] input: MT6358 PMIC button support Date: Fri, 21 Jan 2022 15:03:19 +0100 Message-Id: <20220121140323.4080640-1-mkorpershoek@baylibre.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220121_060330_108377_608AFD66 X-CRM114-Status: GOOD ( 11.56 ) 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 v3 [1]: * checkpatch.pl --strict fixes Changes since v2 [2]: * added 4th patch with device tree enable * cover letter title prefixed with 'input' This has been tested with evtest on mt8183-pumpkin on input/next [1] https://lore.kernel.org/r/20210702134310.3451560-1-mkorpershoek@baylibre.com [2] https://lore.kernel.org/r/id:20210512152648.39961-1-mkorpershoek@baylibre.com 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 | 55 +++++++++++++++++-- 3 files changed, 67 insertions(+), 5 deletions(-) base-commit: 87a0b2fafc09766d8c55461a18345a1cfb10a7fe