From patchwork Fri Apr 15 15:36:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12815175 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 DBF69C433EF for ; Fri, 15 Apr 2022 16:13:45 +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:References:In-Reply-To: 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: List-Owner; bh=OA+LflyPFpiYHIOb2udbts7Ebt9foaVxUGq8mTXEtoY=; b=tjbqyThRgxmddx F+1hH5jkKt+wSgT9cDUfLad7S8fz4uEYdvQgsrH4HYFg5jQm2m2kJMLi+Ew1gMk4roL4FLHaWmjSA Ox5RzNEeqXVlnjvRgk0pHhTjICZNPtFpOjmQ08D2HJsXucYhhOdiAEvlBan0hhffXM/QEyEncSLML bZ/OX5azQG80SP0KKyFRYQYHu0Z9gIH7S/CjXU2IghQJleF93cQDM5QBJvX3YlABsustAEAKdO4cq VWNjdY+oEFOdQowAV191uE0+PQErMHpnWnJeG0nl8ewUNzmOWSp9fVvO83vHyPEH1uDfc1oDkAnOV c7ocpEu3JuqUj0ops26w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfOYg-00Apnj-I0; Fri, 15 Apr 2022 16:12:31 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfO0Q-00AbTm-EF for linux-arm-kernel@lists.infradead.org; Fri, 15 Apr 2022 15:37:08 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 123-20020a1c1981000000b0038b3616a71aso5227036wmz.4 for ; Fri, 15 Apr 2022 08:37:05 -0700 (PDT) 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:in-reply-to:references :mime-version:content-transfer-encoding; bh=aOuA22Fnc3OP61xN2U3nVIxEXPTaTGZoGkevrFGNYyg=; b=DyqkpaQ0iLmMxTSpSfK+MHcWI4dG85kzMTTwtuWYeCRYtIbx5bXRyT07WmWzHsFmI+ LI7CkRLc+ATmkIkjkRB9h7V4Mh98t7/3VuRbUF0WCDbS6f2SXmzSakByyD0Riyyh+BHk z5lhZdYKONmGFs7ue+eR/heV4ycjYDy1Q7Tc41VQvf4+ih15zXlglAOI8WCf6WOV2LnS 6JnC6vlrDmKK02wcArS0L3jp8LUEjEwldHeD6qMv0Af21Wnar178mT4n7B4ByVi4nMAb UccU/HRTf1L9z8lDcTAvb9l2ETglTQ1praXDN3tBtyA2Dp/Hudnldqd4NOKzHhFW7Xqf Ql/g== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=aOuA22Fnc3OP61xN2U3nVIxEXPTaTGZoGkevrFGNYyg=; b=Y0M7J3AYbg6K+FlLZSYuJriVFJY3Uhc4jAnqpat/r5g/RE3aoOTXhuUIPRu5WlLwmI wmjWBAR0w/KPG4soBFFj9xJ/UVkmZocbodQVrjlapHHkoHzYvuorDHu/pNHyebv69Kvj iNBnn4rqVbnRy2aX4mBKl8KZkk+2hcmfgVd5sW2okWEIe2+mhtGdyMayGLAH7lU4yAFX EZCZUH71gmEf4d0D9E32ZM7q6U6X54jajY7ximHHsLPSaBlrozs/PNfx0IWY788tFnUT 8EXt1JSqoX62R6qKUHRtEWFejLL7IwS66CRtqzE4eIPbU919JBHWRqe2ZxAlLdtE/BIe ixVg== X-Gm-Message-State: AOAM532RhJQT+qkSeXfMWvspP8Z0JFb0pa98dYUazKM5nGRj96lLugam IFdhgDyGTAjjUllz0y2JUwIS4g== X-Google-Smtp-Source: ABdhPJx03NY3RAywsaD42S7tmhUjufCPfkN1P5jZuGzXIexElqoiAjwpZmPJGrrZ71UlLBgVNggQLw== X-Received: by 2002:a7b:c384:0:b0:38e:6b47:58c4 with SMTP id s4-20020a7bc384000000b0038e6b4758c4mr3783287wmj.134.1650037024073; Fri, 15 Apr 2022 08:37:04 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id c24-20020a7bc018000000b0038a18068cf5sm8459292wmb.15.2022.04.15.08.37.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 08:37:03 -0700 (PDT) From: Fabien Parent To: Dmitry Torokhov , Matthias Brugger Cc: Fabien Parent , linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/7] Input: keyboard: mtk-pmic-keys: add support for MT6359 Date: Fri, 15 Apr 2022 17:36:28 +0200 Message-Id: <20220415153629.1817202-7-fparent@baylibre.com> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220415153629.1817202-1-fparent@baylibre.com> References: <20220415153629.1817202-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220415_083706_567783_489FDD85 X-CRM114-Status: GOOD ( 12.93 ) 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 Add support for the MT6359 PMIC. Signed-off-by: Fabien Parent --- drivers/input/keyboard/mtk-pmic-keys.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c index 609b87afd020..115ed4aaae81 100644 --- a/drivers/input/keyboard/mtk-pmic-keys.c +++ b/drivers/input/keyboard/mtk-pmic-keys.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -87,6 +88,17 @@ static const struct mtk_pmic_keys_pdata mt6358_pdata = { .has_key_release_irqs = true, }; +static const struct mtk_pmic_keys_pdata mt6359_pdata = { + .keys_regs[MTK_PMIC_PWRKEY_INDEX] = + MTK_PMIC_KEYS_REGS(MT6359_TOPSTATUS, + 0x2, MT6359_PSC_TOP_INT_CON0, 0x5), + .keys_regs[MTK_PMIC_HOMEKEY_INDEX] = + MTK_PMIC_KEYS_REGS(MT6359_TOPSTATUS, + 0x8, MT6359_PSC_TOP_INT_CON0, 0xa), + .pmic_rst_reg = MT6359_TOP_RST_MISC, + .has_key_release_irqs = true, +}; + struct mtk_pmic_keys_info { struct mtk_pmic_keys *keys; const struct mtk_pmic_keys_regs *regs; @@ -264,6 +276,9 @@ static const struct of_device_id of_mtk_pmic_keys_match_tbl[] = { }, { .compatible = "mediatek,mt6358-keys", .data = &mt6358_pdata, + }, { + .compatible = "mediatek,mt6359-keys", + .data = &mt6359_pdata, }, { /* sentinel */ }