Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp28419lfe; Fri, 15 Apr 2022 17:53:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzK9mWq2xQ6cyNAiBcZlsWyCLvlacYyf7CoV2Q0lbN2VhTRSQdHFLZoP53c2UYp0+wOT/VZ X-Received: by 2002:a17:90b:1d90:b0:1ca:9f55:3b78 with SMTP id pf16-20020a17090b1d9000b001ca9f553b78mr1547102pjb.38.1650070409747; Fri, 15 Apr 2022 17:53:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650070409; cv=none; d=google.com; s=arc-20160816; b=LI8nYiQXpGi07GmTRZ8EpuNwWVzxdFkUHdU0v/gjYM7OV6R9b6G166p0jF3n8gGx66 qZ6OsnvkZhNMRMCzwyYTol4rpWfdG5W8i+PsDGCRd7lmjya572WW6wQq91M5HrxDrAo7 u4dFPSxw+g9LnfoqE+j3JlSszCoZNuU9zxQFlgsnW6bXtk6B9JCbE2W/In5ZwBm5EcA6 bdB+oQpSqwvhtqj3kkDwJ1tO92expX3quwcdQ3vMj6MwlnxlU2C3QmHu7oiIjkx660uH 6SUvGtvjRVeHmVDBgS/FadCnoeGBv93Zpnm7Tr+5sFoSiGACoFS4nXiBOi992uNvHM/6 tTug== 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=aOuA22Fnc3OP61xN2U3nVIxEXPTaTGZoGkevrFGNYyg=; b=oURoB4nxqoHv2hVU3+DMxn1Fkls25G8hPhcFV0nbtbtiZyl8O0IFF8PQrs+KFUMOIO h1ZHRMN9cJM3qcS6LPpPyTeHbLJubx92k0L6Bl66UTzw2TE5f3Gb2sTA0w8paQD2OqXF aaBJxFCVcaEaa8HN0OX2tztmkZf623bShvrj74n8mo02KpLesFoLQ4DmdaWJ3gzJvtwN og7WHIYxS/JqiBa61QwYYHZKB8lNF5weUOTljhglF1zkKJ3XiNP7JnQ6jJxS1KwCfRcA 4ko8ClTuIC4vIWcbZ21dvrL6M8UksfRmU5HNIcJTkVCxxgI7SfyvepK8AO468uS5AcPy nAVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=DyqkpaQ0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id i1-20020aa78d81000000b00505acac6e56si2749251pfr.194.2022.04.15.17.53.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 17:53:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=DyqkpaQ0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 3612F10240B; Fri, 15 Apr 2022 17:40:19 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355521AbiDOPkI (ORCPT + 99 others); Fri, 15 Apr 2022 11:40:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356323AbiDOPje (ORCPT ); Fri, 15 Apr 2022 11:39:34 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AFE73C72F for ; Fri, 15 Apr 2022 08:37:05 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id i82-20020a1c3b55000000b0038ccb70e239so3330902wma.3 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=diJtZPrCBzq3Ypw2b5F+xmYbhRqUo8T0+feO7PpiltoxgwGcum3dQTH+VS6uvf0c75 44iORJwYsuDImWhv97vn07mSQwtZGERCWW9DWYaNEVxR76LdFb+JkQemibZXkada6Gqu vf2sdo+UJDQObGT6/e9ypKXwNiveQ6YzAFxu/YgohC77i/Sa5khmTdhPkrR1HjeaLeCH GsSH78tnzV15qxv65AHQ/5WfDMiLjuZdLFanosOV2Yk9sVthNdUqjNQ0W7ha/ayGKc1T QKsaHK9X16rNXQsucIH0pujIfFwgRrmeST76W72osznTIdlByCZvLWQJUgM87z5L8uLc u3Dw== X-Gm-Message-State: AOAM530qrVcSzGIB6shHdWqTTFpxcozwLmkCzMd6BP0/nNkCT7BWpFV+ cpk/p/e+CtRBvavo1iUYXPMuGMYYnBUpmA== 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 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,T_SCC_BODY_TEXT_LINE 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 --- 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.35.2