linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/7] dt-bindings: input: mtk-pmic-keys: add binding for MT6357 PMIC
       [not found] <20220531124959.202787-1-fparent@baylibre.com>
@ 2022-05-31 12:49 ` Fabien Parent
  2022-06-05 21:30   ` Rob Herring
  2022-05-31 12:49 ` [PATCH 7/7] Input: mtk-pmic-keys: add MT6357 support Fabien Parent
  1 sibling, 1 reply; 3+ messages in thread
From: Fabien Parent @ 2022-05-31 12:49 UTC (permalink / raw)
  To: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski,
	Matthias Brugger
  Cc: Fabien Parent, linux-input, devicetree, linux-arm-kernel,
	linux-mediatek, linux-kernel

Add binding documentation for the PMIC keys on MT6357.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 Documentation/devicetree/bindings/input/mtk-pmic-keys.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt
index 9d00f2a8e13a..7eb0751afa22 100644
--- a/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt
+++ b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt
@@ -12,6 +12,7 @@ Required properties:
 - compatible: Should be one of:
 	- "mediatek,mt6397-keys"
 	- "mediatek,mt6323-keys"
+	- "mediatek,mt6357-keys"
 	- "mediatek,mt6358-keys"
 - linux,keycodes: See Documentation/devicetree/bindings/input/input.yaml
 
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 7/7] Input: mtk-pmic-keys: add MT6357 support
       [not found] <20220531124959.202787-1-fparent@baylibre.com>
  2022-05-31 12:49 ` [PATCH 2/7] dt-bindings: input: mtk-pmic-keys: add binding for MT6357 PMIC Fabien Parent
@ 2022-05-31 12:49 ` Fabien Parent
  1 sibling, 0 replies; 3+ messages in thread
From: Fabien Parent @ 2022-05-31 12:49 UTC (permalink / raw)
  To: Dmitry Torokhov, Matthias Brugger
  Cc: Fabien Parent, linux-input, linux-arm-kernel, linux-mediatek,
	linux-kernel

Add PMIC Keys support on MT6357 SoC.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---

This commit depends on 
https://lore.kernel.org/all/20220415153629.1817202-1-fparent@baylibre.com/

 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..3a256c885a3b 100644
--- a/drivers/input/keyboard/mtk-pmic-keys.c
+++ b/drivers/input/keyboard/mtk-pmic-keys.c
@@ -9,6 +9,7 @@
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
 #include <linux/mfd/mt6323/registers.h>
+#include <linux/mfd/mt6357/registers.h>
 #include <linux/mfd/mt6358/registers.h>
 #include <linux/mfd/mt6397/core.h>
 #include <linux/mfd/mt6397/registers.h>
@@ -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 mt6357_regs = {
+	.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
+		MTK_PMIC_KEYS_REGS(MT6357_TOPSTATUS,
+		0x2, MT6357_PSC_TOP_INT_CON0, 0x5),
+	.keys_regs[MTK_PMIC_HOMEKEY_INDEX] =
+		MTK_PMIC_KEYS_REGS(MT6357_TOPSTATUS,
+		0x8, MT6357_PSC_TOP_INT_CON0, 0xa),
+	.pmic_rst_reg = MT6357_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;
@@ -261,6 +273,9 @@ static const struct of_device_id of_mtk_pmic_keys_match_tbl[] = {
 	}, {
 		.compatible = "mediatek,mt6323-keys",
 		.data = &mt6323_pdata,
+	}, {
+		.compatible = "mediatek,mt6357-keys",
+		.data = &mt6357_regs,
 	}, {
 		.compatible = "mediatek,mt6358-keys",
 		.data = &mt6358_pdata,
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/7] dt-bindings: input: mtk-pmic-keys: add binding for MT6357 PMIC
  2022-05-31 12:49 ` [PATCH 2/7] dt-bindings: input: mtk-pmic-keys: add binding for MT6357 PMIC Fabien Parent
@ 2022-06-05 21:30   ` Rob Herring
  0 siblings, 0 replies; 3+ messages in thread
From: Rob Herring @ 2022-06-05 21:30 UTC (permalink / raw)
  To: Fabien Parent
  Cc: linux-mediatek, linux-input, linux-arm-kernel, Rob Herring,
	Krzysztof Kozlowski, linux-kernel, Dmitry Torokhov, devicetree,
	Matthias Brugger

On Tue, 31 May 2022 14:49:54 +0200, Fabien Parent wrote:
> Add binding documentation for the PMIC keys on MT6357.
> 
> Signed-off-by: Fabien Parent <fparent@baylibre.com>
> ---
>  Documentation/devicetree/bindings/input/mtk-pmic-keys.txt | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-05 21:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20220531124959.202787-1-fparent@baylibre.com>
2022-05-31 12:49 ` [PATCH 2/7] dt-bindings: input: mtk-pmic-keys: add binding for MT6357 PMIC Fabien Parent
2022-06-05 21:30   ` Rob Herring
2022-05-31 12:49 ` [PATCH 7/7] Input: mtk-pmic-keys: add MT6357 support Fabien Parent

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).