Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4394093ioa; Wed, 27 Apr 2022 02:54:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0EVGkvjtc0hfwBRN4a0FqhDEN0gGf5cpyLfi3y6wT20FcPx5UidH4EqUOkrQz1zsJN643 X-Received: by 2002:a17:902:768c:b0:155:e4a2:1f09 with SMTP id m12-20020a170902768c00b00155e4a21f09mr27119182pll.43.1651053272916; Wed, 27 Apr 2022 02:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651053272; cv=none; d=google.com; s=arc-20160816; b=cSq6FDnxoixXbsf0nv7e0VIEvkaDGgsCGuAfnDzWoIX6mP+eHqz9Tc83AmkRzBs26r 03Y13Xb6F+s+USGUBZ+YUmFFPxZzVu2q3B9IyWI+fT6lz7xX3WxUs9qsg47jhYFthy40 r9exRt/IUDo/Q0P3uDQSzAd4QAhW+oKUp4omQl2UHIiuHqll9Ai2HHN+qBjWIQlwix5D nvrd6y8Iy2YJOQm7gp1VluHh4ZNdeWB9RIHB4UpclgY4fzIpFvF5ewr/18zGTZD2JMZD 1RNPz74/6pW1L66sxJlRpMe120smwft2tZ231FrsDCJQdI/EKM43wNAjnsc2rl29m2yq Nz1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qek8WhKX0R1hchr7sewuE/CWJLJNrj/b//Vrg13RV5s=; b=PN6h5tW6PpwMvcytZg3v8jmpNmFecHRbQ7W2xGZBVjEY5whJzth9yifUaoGul1xiR+ uIaTDv3Vud3eBOZMbv/cQR6gedeAGruIC8tPl1AFQmKx9Z9nwC+izKweZSFezlz4NP32 Gbq0fQ6HppS9o8/nLaqEzZU3gCgwTNZeDcjCKZHusmxBz7OFD8bC7FmHzeLN6xnC0REC W9s8qgRTPa+nB3mKGuTQ48bzab+L8dmBI0gRMRjtGPMqCfTLz6vivCxZG0ZbHAJAg4iT ZW0Pqk7os8N91j+abeL2RVfFroqA4aiXsHU7QykLlcQBM2oiFxzWH9GYiV/k/MIEPdaO Mp4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=uM2UEk3a; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id d11-20020a63fd0b000000b003990deab146si1012421pgh.595.2022.04.27.02.54.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 02:54:32 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=uM2UEk3a; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 79DF82AE89B; Wed, 27 Apr 2022 02:24:44 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351262AbiDZN5G (ORCPT + 99 others); Tue, 26 Apr 2022 09:57:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351215AbiDZN4q (ORCPT ); Tue, 26 Apr 2022 09:56:46 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76D2115DD7E for ; Tue, 26 Apr 2022 06:53:37 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id s21so10890792wrb.8 for ; Tue, 26 Apr 2022 06:53:37 -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=qek8WhKX0R1hchr7sewuE/CWJLJNrj/b//Vrg13RV5s=; b=uM2UEk3aImwHE6qFhV3CyW6+TuirIyp6LnmblEvuDSJAZMIzZc1m+gOFbqP/RjTQEI HjG/j2jhXKM7AwvpWXiR3m/hN5fyUxXZFmNsHUxkOSgRW3lDZU/vryXlk85JzE/hFMs1 B+7BTJUsQEAlPnrroSd49bUYmEjRxYx88fHT9axNXJZGKupxGuTs/3fnc7fbnkjrMlfm xxoF7nBpXQAaVNGgMHdtTLzd9B5dHKR8n+Dd5Kz8vlpMeA5Nm3W2E6RGleTrzyi/O9i6 4bwhOeLOwvOla0GTEMCNp+04CH2vD2i0oNR8S9XF2vdlto4CU8JTvnGnAo7MvtTJc4cJ 4hFw== 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=qek8WhKX0R1hchr7sewuE/CWJLJNrj/b//Vrg13RV5s=; b=EaWhcQ7oT6a5jOtT+VcyxaVjg1EKn5xOVL1BD6LUgMijuMKLdk9/8wchva8u0Fs3lR 6WhCe83WKz8P8X8kAHeTbHPWDpev7ps8crzSYLxxuXxb3Ugx7iyZXh0mSBLhf2b2XNfZ PsRs2nEWVrYnJTIj+1OE782MLaJaq0WAq+u537a1NdSv782hWwiak/xksZNvQ4O7rpW8 1yf2dwZgPj+DrI2aX+a9NJkTufyM9DVvkdWf0acseczWAfJCvSDA8dGgoPCTTUgOUNif xxqAYEN9MQ0EqiBJXa930oYpRxsRyG6fviqQ2B08k+A3SvVVJjKAwwQEaBdhLb8raOEK jZqw== X-Gm-Message-State: AOAM531Ym7RUxCFmIopfRdegvF4UPwgdb3/hmnudHE472sIuEtOK22lk pF+7VHfNCa1XhyBc0tCwkqXxjA== X-Received: by 2002:a5d:47c3:0:b0:20a:d856:8a9c with SMTP id o3-20020a5d47c3000000b0020ad8568a9cmr9762114wrc.181.1650981216041; Tue, 26 Apr 2022 06:53:36 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id m35-20020a05600c3b2300b00393ebe201a6sm5504775wms.44.2022.04.26.06.53.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 06:53:35 -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 v2 6/8] Input: keyboard: mtk-pmic-keys: add support for MT6359 Date: Tue, 26 Apr 2022 15:53:11 +0200 Message-Id: <20220426135313.245466-7-fparent@baylibre.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426135313.245466-1-fparent@baylibre.com> References: <20220426135313.245466-1-fparent@baylibre.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for the MT6359 PMIC. Signed-off-by: Fabien Parent --- v2: no changes 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 */ } -- 2.36.0