From patchwork Wed Apr 28 16:42:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mattijs Korpershoek X-Patchwork-Id: 12229665 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.0 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,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 CCCBAC433B4 for ; Wed, 28 Apr 2021 16:44:32 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 2DA28613FF for ; Wed, 28 Apr 2021 16:44:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2DA28613FF 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=desiato.20200630; 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=IHosH/d7GRBUKS7IHhpLQ2Hp9nla7EZ33bA3sMk5iQ8=; b=PXt/gQsLneG7rm25h4Tw6xw/sx 8Szjj2XCr0RlMpFWCmbT3dBOq2L5uNsZNCuErv3yxAxTy30uz4ofEATp4Z1RU4xbXBjzPxIgpQn4K Irr4ZRpDGe3IQmQjZKmzGXiW1wloIGkihB2cbVW1Qrim2I5ziXYofqDIIFf3MUDCfch3qOiHi/Mk+ s83nkRrU9pBkOJs36Npf+wm6qH9O2bA94abZMHc2KODRtb2GjVyelgohCGefEtdNtKk+pD6VTJ9FZ 63ZHr41r/P3aaAqaEtfK5qW2NKZJ6W7GuuF/NYj6HEbhRzqaII48t5COkX0EGg2LfODNBZriZvygB pz2bHvSA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lbnGn-003rIA-J6; Wed, 28 Apr 2021 16:42:37 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lbnGg-003rEu-Gk for linux-arm-kernel@desiato.infradead.org; Wed, 28 Apr 2021 16:42:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=ubJ2BAniIRemLaU8X4uRVoCRnVru80P0B3QSFnUPvls=; b=DBgfs8rTABOvyPETFPylBM+QjS psmijuJbCzPUm9Tg8bp+mzLjnNCzgIsCvMd06OOjQv4oKMiTKS0ZgxP8xVEBF9ZrzP7auSSed7Vot IUaQIdi2dthfUG2qevGW4xOejh0fuQGoY0unAQcj/W4U3R/LDgNw26A/GDBnwWClP1QFqb8pzWwyY YEY6hj5D+EVYCE6OQaGHGGkoZZUoCDtbi3gxy8Lpgwk9cpFvio0DeWyaCVPQLSLHqWsqGtDN9SWOL QDiiohpa5w5zhqB2wesnh/klOYbXtej+8ljx/ahgvw3OAyDTdqoj6ZkiyKMlTcSEe/YP++0KWyuFn +zo6oobA==; Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lbnGd-0001dZ-6T for linux-arm-kernel@lists.infradead.org; Wed, 28 Apr 2021 16:42:29 +0000 Received: by mail-wm1-x329.google.com with SMTP id m5so7432403wmf.1 for ; Wed, 28 Apr 2021 09:42:26 -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=ubJ2BAniIRemLaU8X4uRVoCRnVru80P0B3QSFnUPvls=; b=sjDyBcAUw+niGrgBRYnAhJbDlNXf5UnkpIk9B5b7Ek864gmX4eEljIuwbsiJxc2j1l RGsBNC6RocmribujHlCv/kSIsL6TSL3sgaByMxBd7a/9iN4gaeU7fgk2kRrVgfP3ZTV8 0hfgYGXNhYzyoLFcuwbEjo9oFaXmt6xmmhEG0zLNJqZyYMT7dYHlXdkp2nSlvbXN/pC3 NCTlTB+NjXSELFcS9e4GxKy/yX6wc4wCCIwWoZtCeOJUzeIhfKX3URIvjndGug/YHid2 uq1c/y57bJohulo4mPvn7DIyjMQnShoooRc8qu8poEmBv2YCQgp/+pMKLLdnie0J3cjV 5fHA== 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=ubJ2BAniIRemLaU8X4uRVoCRnVru80P0B3QSFnUPvls=; b=Cg9tLIKXv8tVfnXYGAIfLdTH3joHta8h/y7eptBpOHFKealY2CRBbFL+5PNw9Wp1Cd a3hu5N09qbBEe6pn6ZxTnwhF0Msg/ZpvGmB6SicW3CroWTaSb7hJ0bDOu3GIwjdF+aUR 7y2WoYBqUhQRkqCe7/gwWmdFCam+BTyTkcBIuUzaSIa7Udmtq8UUar5GeQZBqCzOQZih bF7Ib7eVkLRCaTP0+tvcDYwgtmQJSkxu8hWImXPdJ2VCqmP8lDZG1L9BdR6BnYihmFUN yQvcC48veK+/gkHzhz6p9w8RK3pN+JCxNmMs8Jfxa6ENjzPuRISAuXFRon0O0asSqDPR fvpg== X-Gm-Message-State: AOAM53244UV7SByfHpO4EitS/aPT+ffYd3W5+wqXtdpm5q5WjppiWjQ2 33aa3M24WpwtXpOKv8S3lWwSig== X-Google-Smtp-Source: ABdhPJxQNsq2WFwU6ZDYpb3o5UuepMwD+FY3DcW+VZ6viQMaS0p4LvlHVzcIPoKvaSVim9HbKcMvmQ== X-Received: by 2002:a1c:4382:: with SMTP id q124mr24697367wma.63.1619628144853; Wed, 28 Apr 2021 09:42:24 -0700 (PDT) Received: from groot.home ([2a01:cb19:826e:8e00:5864:ddd1:d623:f912]) by smtp.gmail.com with ESMTPSA id o10sm351299wrx.35.2021.04.28.09.42.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Apr 2021 09:42:24 -0700 (PDT) From: Mattijs Korpershoek To: Matthias Brugger Cc: fparent@baylibre.com, Mattijs Korpershoek , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 0/7] Input: mtk-pmic-keys - add support for MT6358 Date: Wed, 28 Apr 2021 18:42:12 +0200 Message-Id: <20210428164219.1115537-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-20210428_094227_255552_170AF8CA X-CRM114-Status: GOOD ( 13.85 ) 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. These series: * Fix a NULL ptr error when we use mtk-pmic-keys without dts code * Rework the mt6397 driver to prepare for this different interrupt logic * Add support for the MT6358 power buttons This has been functionally tested (using evtest) on the mt8183-pumpkin board on linux/master It has also been used for a couple of months in a downstream tree based on v5.4. Mattijs Korpershoek (7): Input: mtk-pmic-keys - check for NULL on of_match_device() mfd: mt6397: add mt6358 register definitions for power key mfd: mt6397: keys: use named IRQs instead of index dt-bindings: input: mtk-pmic-keys: add MT6358 binding definition Input: mtk-pmic-keys - add support for MT6358 mfd: mt6397: Add PMIC keys 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 | 59 +++++++++++++++++-- drivers/mfd/mt6397-core.c | 20 +++++-- include/linux/mfd/mt6358/registers.h | 2 + 5 files changed, 89 insertions(+), 9 deletions(-) base-commit: 4a0225c3d208cfa6e4550f2210ffd9114a952a81