Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp755585ybi; Wed, 19 Jun 2019 07:21:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6kc2cS2YjfVcqxs80g0S8A5iWa8ecDzT7Q8wuipSgK6qm+P7/eYiChBR4F7XGgvlpfFC8 X-Received: by 2002:a17:902:e490:: with SMTP id cj16mr117504667plb.136.1560954087407; Wed, 19 Jun 2019 07:21:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560954087; cv=none; d=google.com; s=arc-20160816; b=HQ2DduV5M3S9QPttQHShbhxSu/dLASRk2YKOPhvyYf94ksJmAdvAiD2P3CqDXpnHuw X0fUNlxYeFl6DZCq5fMJDcve5mePPedVuOGiu+6oygUlf2c/3IEv8VAGHNS5F19mg752 AEYpwajCnKa+EtQLSI9ZH79RA2BC4Gk6N0EFf0EZjyuqxRBmJ/2PzBKnLGxci+QBrJWM 7a52S/HHOeaydGdv7tca9mfHJsMVFP695HQGVd2gReRxJpEuuAu9fljzONrT5WjFEyHE RGkZYhgoej4FcKLuIZWvRkPfuWvzNqKYBhFl/JfJGSOy04OEtvOLbhr/doJl921sydKZ QBKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5HyKzjCvcphbyNNVjsqXzUyUkExzumkqB7IfOWgPvTo=; b=Bafo2oYxD7QQ3OfrNHXr/ndVcswl6+utIQgAMnhsCMmguie1eyqw61RKtS+rQ3rZbB 0vujdhxgVkqlAVX44QxvwCrZexBf3q+idEslTqf/1S1wbf+08w97JJpC+jD1XXiLKRNK Fjxy4+xgScDKUGlnaoIh9asDFlmMatDMyU5NfcylTEzl2AP7MR+O7EhwPo89QIvrDH32 ivLbbU6ITBp4dziBTDlJ74ZR+j3Eiq7lB3Qru6766+qFUoNqz9FDGmYnXfX7ILT338O2 QfIJou+gYLvTl7+kHc3fR8zd76kUURYtQwskH3Pm4mqmVliIfpglFsAT1eW5OM4n6oFz qgaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=NpRVQ17F; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j63si3339243pgc.185.2019.06.19.07.21.12; Wed, 19 Jun 2019 07:21:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=NpRVQ17F; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731067AbfFSOUr (ORCPT + 99 others); Wed, 19 Jun 2019 10:20:47 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:32849 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730808AbfFSOU0 (ORCPT ); Wed, 19 Jun 2019 10:20:26 -0400 Received: by mail-wr1-f65.google.com with SMTP id n9so3650051wru.0 for ; Wed, 19 Jun 2019 07:20:25 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=5HyKzjCvcphbyNNVjsqXzUyUkExzumkqB7IfOWgPvTo=; b=NpRVQ17FE5ogKoQQdxGUdIBHv8s9KiTNDLw6TjNwtqmrDSa/H59OeSGW/8/xZt6sqx d2g4gqYlR0FSHvHrdWyDROEB0p0ZV5/Hmw0p/4fjYjnkah50Tzac3NmNfkUBoQPSIfUx GBnSl0tQnsP47cLz3hH8S7FF+pYLgQ92s49MY7UTKHM4KJtfisGXxXnhA+tcErqNU4qH 3aV9K5QKBIITdl1HO8D9fSh6KMv3ObN6M+bDo2CwtseqdiVJxVJol2dnOhWZWHGVCYa7 gzrSNlEEQMoW4XE+YfJojJEwo12iEhM3UyVY2dxAh4bsWIGtwfzgk4IOubb4D9qT/qbv CYrQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=5HyKzjCvcphbyNNVjsqXzUyUkExzumkqB7IfOWgPvTo=; b=Mk0ODMz5zIQMUL+T6CLp2S5eQgP9CRkY/AzKCMI3IQRSGF5FvfQ8ujasZNRwNWo30v f0MiEXOE+KZaMjR7hyip2hY/HJxXnf+SL960tk7VejE4nFSZReyBrLm4Zhn0696I7CGm fEA8jkd8ek/s5a89NQTZYyyJ3rIVHyWKY5qxZdrnCYsOpC0JeHtrud7vswVhL9kRMSSX a4Ehqbh0NMLXtaZ09s8NfTSBCDrgBLB81OBBWoNhV4CmTHP2aUKyBKBl/lC3Rmnu0k5X hr/IvP6xb+KoKw0VkyQ0CQretG6+/JJ0BbgETujxj9tYMr2vf10xwXXSHzJSZ1Vrw1lC QYmQ== X-Gm-Message-State: APjAAAVWN5zK40kSXGP7kTa1FqdOrlOO3YnHusIGpuV4DAcNsq2+OcAd Q+jLhS+eojdUfBewKDeaZ7amkQ== X-Received: by 2002:adf:a345:: with SMTP id d5mr9180977wrb.234.1560954024807; Wed, 19 Jun 2019 07:20:24 -0700 (PDT) Received: from localhost.localdomain (amontpellier-652-1-281-69.w109-210.abo.wanadoo.fr. [109.210.96.69]) by smtp.gmail.com with ESMTPSA id o20sm24209979wrh.8.2019.06.19.07.20.23 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 19 Jun 2019 07:20:24 -0700 (PDT) From: Fabien Parent To: robh+dt@kernel.org, mark.rutland@arm.com, matthias.bgg@gmail.com, lee.jones@linaro.org, lgirdwood@gmail.com, broonie@kernel.org Cc: dmitry.torokhov@gmail.com, 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, Fabien Parent Subject: [PATCH v4 6/7] input: keyboard: mtk-pmic-keys: add MT6392 support Date: Wed, 19 Jun 2019 16:20:12 +0200 Message-Id: <20190619142013.20913-7-fparent@baylibre.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190619142013.20913-1-fparent@baylibre.com> References: <20190619142013.20913-1-fparent@baylibre.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for MT6392 PMIC's keys. Signed-off-by: Fabien Parent Acked-by: Dmitry Torokhov --- V4: * Patch was previously sent separately but merge to this patch series since there is a hard dependency on the MFD patch. --- drivers/input/keyboard/mtk-pmic-keys.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c index 746ff06eaf8d..91ddf0dd5e44 100644 --- a/drivers/input/keyboard/mtk-pmic-keys.c +++ b/drivers/input/keyboard/mtk-pmic-keys.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -74,6 +75,16 @@ static const struct mtk_pmic_regs mt6323_regs = { .pmic_rst_reg = MT6323_TOP_RST_MISC, }; +static const struct mtk_pmic_regs mt6392_regs = { + .keys_regs[MTK_PMIC_PWRKEY_INDEX] = + MTK_PMIC_KEYS_REGS(MT6392_CHRSTATUS, + 0x2, MT6392_INT_MISC_CON, 0x10), + .keys_regs[MTK_PMIC_HOMEKEY_INDEX] = + MTK_PMIC_KEYS_REGS(MT6392_CHRSTATUS, + 0x4, MT6392_INT_MISC_CON, 0x8), + .pmic_rst_reg = MT6392_TOP_RST_MISC, +}; + struct mtk_pmic_keys_info { struct mtk_pmic_keys *keys; const struct mtk_pmic_keys_regs *regs; @@ -229,6 +240,9 @@ static const struct of_device_id of_mtk_pmic_keys_match_tbl[] = { }, { .compatible = "mediatek,mt6323-keys", .data = &mt6323_regs, + }, { + .compatible = "mediatek,mt6392-keys", + .data = &mt6392_regs, }, { /* sentinel */ } -- 2.20.1